auth.mixins.AccessMixin.raise_exception

raise_exception If this attribute is set to True, a PermissionDenied exception will be raised instead of the redirect. Defaults to False.

admin.AdminSite

class AdminSite(name='admin') [source] A Django administrative site is represented by an instance of django.contrib.admin.sites.AdminSite; by default, an instance of this class is created as django.contrib.admin.site and you can register your models and ModelAdmin instances with it. When constructing an instance of an AdminSite, you can provide a unique instance name using the name argument to the constructor. This instance name is used to identify the instance, especially when reversing adm

db.models.query.QuerySet.earliest()

earliest(field_name=None) Works otherwise like latest() except the direction is changed.

db.models.IntegerField

class IntegerField(**options) [source] An integer. Values from -2147483648 to 2147483647 are safe in all databases supported by Django. The default form widget for this field is a NumberInput when localize is False or TextInput otherwise.

forms.SelectDateWidget.empty_label

empty_label If the DateField is not required, SelectDateWidget will have an empty choice at the top of the list (which is --- by default). You can change the text of this label with the empty_label attribute. empty_label can be a string, list, or tuple. When a string is used, all select boxes will each have an empty choice with this label. If empty_label is a list or tuple of 3 string elements, the select boxes will have their own custom label. The labels should be in this order ('year_label

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.symmetrical

ManyToManyField.symmetrical Only used in the definition of ManyToManyFields on self. Consider the following model: from django.db import models class Person(models.Model): friends = models.ManyToManyField("self") When Django processes this model, it identifies that it has a ManyToManyField on itself, and as a result, it doesn’t add a person_set attribute to the Person class. Instead, the ManyToManyField is assumed to be symmetrical – that is, if I am your friend, then you are my friend

gis.db.models.MultiPointField

class MultiPointField

http.HttpResponseRedirect

class HttpResponseRedirect [source] The first argument to the constructor is required – the path to redirect to. This can be a fully qualified URL (e.g. 'https://www.yahoo.com/search/'), an absolute path with no domain (e.g. '/search/'), or even a relative path (e.g. 'search/'). In that last case, the client browser will reconstruct the full URL itself according to the current path. See HttpResponse for other optional constructor arguments. Note that this returns an HTTP status code 302. ur

views.decorators.cache.cache_page()

django.views.decorators.cache.cache_page() A more granular way to use the caching framework is by caching the output of individual views. django.views.decorators.cache defines a cache_page decorator that will automatically cache the view’s response for you. It’s easy to use: from django.views.decorators.cache import cache_page @cache_page(60 * 15) def my_view(request): ... cache_page takes a single argument: the cache timeout, in seconds. In the above example, the result of the my_view