core.signing.dumps()

dumps(obj, key=None, salt='django.core.signing', compress=False) [source] Returns URL-safe, sha1 signed base64 compressed JSON string. Serialized object is signed using TimestampSigner.

db.models.functions.datetime.ExtractYear

class ExtractYear(expression, tzinfo=None, **extra) [source] lookup_name = 'year'

http.HttpResponse.flush()

HttpResponse.flush() This method makes an HttpResponse instance a file-like object.

contenttypes.admin.GenericStackedInline

class GenericStackedInline Subclasses of GenericInlineModelAdmin with stacked and tabular layouts, respectively.

contenttypes.models.ContentType.model_class()

ContentType.model_class() Returns the model class represented by this ContentType instance. For example, we could look up the ContentType for the User model: >>> from django.contrib.contenttypes.models import ContentType >>> ContentType.objects.get(app_label="auth", model="user") <ContentType: user> And then use it to query for a particular User, or to get access to the User model class: >>> user_type.model_class() <class 'django.contrib.auth.models.User'

gis.gdal.Envelope.expand_to_include()

expand_to_include(*args)

gis.geos.MultiLineString

class MultiLineString(*args, **kwargs) MultiLineString objects may be instantiated by passing in LineString objects as arguments, or a single sequence of LineString objects: >>> ls1 = LineString((0, 0), (1, 1)) >>> ls2 = LineString((2, 2), (3, 3)) >>> mls = MultiLineString(ls1, ls2) >>> mls = MultiLineString([ls1, ls2]) Changed in Django 1.10: In previous versions, an empty MultiLineString couldn’t be instantiated. merged Returns a LineString represe

auth.models.UserManager

class models.UserManager The User model has a custom manager that has the following helper methods (in addition to the methods provided by BaseUserManager): create_user(username, email=None, password=None, **extra_fields) Creates, saves and returns a User. The username and password are set as given. The domain portion of email is automatically converted to lowercase, and the returned User object will have is_active set to True. If no password is provided, set_unusable_password() will be c

gis.db.models.Collect

class Collect(geo_field) Availability: PostGIS, SpatiaLite Returns a GEOMETRYCOLLECTION or a MULTI geometry object from the geometry column. This is analogous to a simplified version of the Union aggregate, except it can be several orders of magnitude faster than performing a union because it simply rolls up geometries into a collection or multi object, not caring about dissolving boundaries.

admin.ModelAdmin.formfield_overrides

ModelAdmin.formfield_overrides This provides a quick-and-dirty way to override some of the Field options for use in the admin. formfield_overrides is a dictionary mapping a field class to a dict of arguments to pass to the field at construction time. Since that’s a bit abstract, let’s look at a concrete example. The most common use of formfield_overrides is to add a custom widget for a certain type of field. So, imagine we’ve written a RichTextEditorWidget that we’d like to use for large tex