db.models.FileField.upload_to

FileField.upload_to This attribute provides a way of setting the upload directory and file name, and can be set in two ways. In both cases, the value is passed to the Storage.save() method. If you specify a string value, it may contain strftime() formatting, which will be replaced by the date/time of the file upload (so that uploaded files don’t fill up the given directory). For example: class MyModel(models.Model): # file will be uploaded to MEDIA_ROOT/uploads upload = models.FileFi

gis.geos.GEOSGeometry.disjoint()

GEOSGeometry.disjoint(other) Returns True if the DE-9IM intersection matrix for the two geometries is FF*FF****.

gis.geos.GEOSGeometry.area

GEOSGeometry.area This property returns the area of the Geometry.

contenttypes.forms.generic_inlineformset_factory()

generic_inlineformset_factory(model, form=ModelForm, formset=BaseGenericInlineFormSet, ct_field="content_type", fk_field="object_id", fields=None, exclude=None, extra=3, can_order=False, can_delete=True, max_num=None, formfield_callback=None, validate_max=False, for_concrete_model=True, min_num=None, validate_min=False) Returns a GenericInlineFormSet using modelformset_factory(). You must provide ct_field and fk_field if they are different from the defaults, content_type and object_id respec

views.generic.detail.SingleObjectMixin.queryset

queryset A QuerySet that represents the objects. If provided, the value of queryset supersedes the value provided for model. Warning queryset is a class attribute with a mutable value so care must be taken when using it directly. Before using it, either call its all() method or retrieve it with get_queryset() which takes care of the cloning behind the scenes.

db.models.functions.datetime.TruncMonth

class TruncMonth(expression, output_field=None, tzinfo=None, **extra) [source] kind = 'month' These are logically equivalent to Trunc('date_field', kind). They truncate all parts of the date up to kind which allows grouping or filtering dates with less precision. expression can have an output_field of either DateField or DateTimeField. Since DateFields don’t have a time component, only Trunc subclasses that deal with date-parts can be used with DateField: >>> from datetime impo

gis.gdal.Layer.num_fields

num_fields Returns the number of fields in the layer, i.e the number of fields of data associated with each feature in the layer: >>> layer.num_fields 4

gis.gdal.SpatialReference.geographic

geographic Returns True if this spatial reference is geographic (root node is GEOGCS).

views.generic.dates.DayMixin.get_next_day()

get_next_day(date) [source] Returns a date object containing the next valid day after the date provided. This function can also return None or raise an Http404 exception, depending on the values of allow_empty and allow_future.

auth.backends.RemoteUserBackend.clean_username()

RemoteUserBackend.clean_username(username) Performs any cleaning on the username (e.g. stripping LDAP DN information) prior to using it to get or create a User object. Returns the cleaned username.