conf.settings.configure()

django.conf.settings.configure(default_settings, **settings) Example: from django.conf import settings settings.configure(DEBUG=True) Pass configure() as many keyword arguments as you’d like, with each keyword argument representing a setting and its value. Each argument name should be all uppercase, with the same name as the settings described above. If a particular setting is not passed to configure() and is needed at some later point, Django will use the default setting value. Configurin

gis.gdal.Envelope.tuple

tuple A tuple representing the envelope.

gis.geos.GeometryCollection

class GeometryCollection(*args, **kwargs) GeometryCollection objects may be instantiated by passing in other GEOSGeometry as arguments, or a single sequence of GEOSGeometry objects: >>> poly = Polygon( ((0, 0), (0, 1), (1, 1), (0, 0)) ) >>> gc = GeometryCollection(Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly) >>> gc = GeometryCollection((Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly)) Changed in Django 1.10: In previous versions, an empty Geo

db.models.ForeignKey.related_query_name

ForeignKey.related_query_name The name to use for the reverse filter name from the target model. It defaults to the value of related_name or default_related_name if set, otherwise it defaults to the name of the model: # Declare the ForeignKey with related_query_name class Tag(models.Model): article = models.ForeignKey( Article, on_delete=models.CASCADE, related_name="tags", related_query_name="tag", ) name = models.CharField(max_length=255) # That

gis.admin.GeoModelAdmin.default_lon

default_lon The default center longitude.

forms.Field.help_text

Field.help_text The help_text argument lets you specify descriptive text for this Field. If you provide help_text, it will be displayed next to the Field when the Field is rendered by one of the convenience Form methods (e.g., as_ul()). Like the model field’s help_text, this value isn’t HTML-escaped in automatically-generated forms. Here’s a full example Form that implements help_text for two of its fields. We’ve specified auto_id=False to simplify the output: >>> from django import

db.models.functions.datetime.TruncHour

class TruncHour(expression, output_field=None, tzinfo=None, **extra) [source] kind = 'hour'

admin.ModelAdmin.get_changelist()

ModelAdmin.get_changelist(request, **kwargs) [source] Returns the Changelist class to be used for listing. By default, django.contrib.admin.views.main.ChangeList is used. By inheriting this class you can change the behavior of the listing.

utils.encoding.is_protected_type()

is_protected_type(obj) [source] Determine if the object instance is of a protected type. Objects of protected types are preserved as-is when passed to force_text(strings_only=True).

utils.decorators.decorator_from_middleware_with_args()

decorator_from_middleware_with_args(middleware_class) [source] Like decorator_from_middleware, but returns a function that accepts the arguments to be passed to the middleware_class. For example, the cache_page() decorator is created from the CacheMiddleware like this: cache_page = decorator_from_middleware_with_args(CacheMiddleware) @cache_page(3600) def my_view(request): pass