utils.timezone.get_current_timezone()

get_current_timezone() [source] Returns a tzinfo instance that represents the current time zone.

http.HttpRequest.__iter__()

HttpRequest.__iter__() Methods implementing a file-like interface for reading from an HttpRequest instance. This makes it possible to consume an incoming request in a streaming fashion. A common use-case would be to process a big XML payload with an iterative parser without constructing a whole XML tree in memory. Given this standard interface, an HttpRequest instance can be passed directly to an XML parser such as ElementTree: import xml.etree.ElementTree as ET for element in ET.iterparse(r

utils.safestring.SafeText

class SafeText [source] A str (in Python 3) or unicode (in Python 2) subclass that has been specifically marked as “safe” for HTML output purposes.

views.generic.dates.YearMixin.get_year_format()

get_year_format() [source] Returns the strftime() format to use when parsing the year. Returns year_format by default.

utils.feedgenerator.SyndicationFeed.item_attributes()

item_attributes(item) [source] Return extra attributes to place on each item (i.e. item/entry) element.

views.generic.edit.FormMixin.get_form()

get_form(form_class=None) Instantiate an instance of form_class using get_form_kwargs(). If form_class isn’t provided get_form_class() will be used.

conf.urls.i18n.i18n_patterns()

i18n_patterns(*urls, prefix_default_language=True) [source] This function can be used in a root URLconf and Django will automatically prepend the current active language code to all URL patterns defined within i18n_patterns(). Setting prefix_default_language to False removes the prefix from the default language (LANGUAGE_CODE). This can be useful when adding translations to existing site so that the current URLs won’t change. Example URL patterns: from django.conf.urls import include, url fr

template.context_processors.static()

static() [source] If this processor is enabled, every RequestContext will contain a variable STATIC_URL, providing the value of the STATIC_URL setting.

views.generic.dates.YearMixin.get_previous_year()

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

admin.ModelAdmin.readonly_fields

ModelAdmin.readonly_fields By default the admin shows all fields as editable. Any fields in this option (which should be a list or tuple) will display its data as-is and non-editable; they are also excluded from the ModelForm used for creating and editing. Note that when specifying ModelAdmin.fields or ModelAdmin.fieldsets the read-only fields must be present to be shown (they are ignored otherwise). If readonly_fields is used without defining explicit ordering through ModelAdmin.fields or M