db.models.functions.datetime.ExtractSecond

class ExtractSecond(expression, tzinfo=None, **extra) [source] lookup_name = 'second' These are logically equivalent to Extract('datetime_field', lookup_name). Each class is also a Transform registered on DateTimeField as __(lookup_name), e.g. __minute. DateTimeField examples: >>> from datetime import datetime >>> from django.utils import timezone >>> from django.db.models.functions import ( ... ExtractYear, ExtractMonth, ExtractDay, ExtractWeekDay, ...

gis.widgets.BaseGeometryWidget.geom_type

BaseGeometryWidget.geom_type The OpenGIS geometry type, generally set by the form field.

core.management.BaseCommand

class BaseCommand [source] The base class from which all management commands ultimately derive. Use this class if you want access to all of the mechanisms which parse the command-line arguments and work out what code to call in response; if you don’t need to change any of that behavior, consider using one of its subclasses. Subclassing the BaseCommand class requires that you implement the handle() method.

core.management.BaseCommand.check()

BaseCommand.check(app_configs=None, tags=None, display_num_errors=False) [source] Uses the system check framework to inspect the entire Django project for potential problems. Serious problems are raised as a CommandError; warnings are output to stderr; minor notifications are output to stdout. If app_configs and tags are both None, all system checks are performed. tags can be a list of check tags, like compatibility or models.

db.models.Field.help_text

Field.help_text Extra “help” text to be displayed with the form widget. It’s useful for documentation even if your field isn’t used on a form. Note that this value is not HTML-escaped in automatically-generated forms. This lets you include HTML in help_text if you so desire. For example: help_text="Please use the following format: <em>YYYY-MM-DD</em>." Alternatively you can use plain text and django.utils.html.escape() to escape any HTML special characters. Ensure that you escap

admin.ModelAdmin.get_changeform_initial_data()

ModelAdmin.get_changeform_initial_data(request) [source] A hook for the initial data on admin change forms. By default, fields are given initial values from GET parameters. For instance, ?name=initial_value will set the name field’s initial value to be initial_value. This method should return a dictionary in the form {'fieldname': 'fieldval'}: def get_changeform_initial_data(self, request): return {'name': 'custom_initial_value'}

db.models.FilePathField.path

FilePathField.path Required. The absolute filesystem path to a directory from which this FilePathField should get its choices. Example: "/home/images".

db.models.ManyToManyField.swappable

ManyToManyField.swappable Controls the migration framework’s reaction if this ManyToManyField is pointing at a swappable model. If it is True - the default - then if the ManyToManyField is pointing at a model which matches the current value of settings.AUTH_USER_MODEL (or another swappable model setting) the relationship will be stored in the migration using a reference to the setting, not to the model directly. You only want to override this to be False if you are sure your model should alw

gis.gdal.OGRGeometry.__len__()

__len__() Returns the number of points in a LineString, the number of rings in a Polygon, or the number of geometries in a GeometryCollection. Not applicable to other geometry types.

forms.BoundField.css_classes()

BoundField.css_classes() [source] When you use Django’s rendering shortcuts, CSS classes are used to indicate required form fields or fields that contain errors. If you’re manually rendering a form, you can access these CSS classes using the css_classes method: >>> f = ContactForm(data={'message': ''}) >>> f['message'].css_classes() 'required' If you want to provide some additional classes in addition to the error and required classes that may be required, you can provide