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

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.

utils.timezone.get_current_timezone()

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

auth.password_validation.MinimumLengthValidator

class MinimumLengthValidator(min_length=8) [source] Validates whether the password meets a minimum length. The minimum length can be customized with the min_length parameter.

core.files.File.mode

mode The read/write mode for the file.

core.files.uploadedfile.UploadedFile.multiple_chunks()

UploadedFile.multiple_chunks(chunk_size=None) Returns True if the uploaded file is big enough to require reading in multiple chunks. By default this will be any file larger than 2.5 megabytes, but that’s configurable; see below.

urls.reverse_lazy()

reverse_lazy(viewname, urlconf=None, args=None, kwargs=None, current_app=None) It is useful for when you need to use a URL reversal before your project’s URLConf is loaded. Some common cases where this function is necessary are: providing a reversed URL as the url attribute of a generic class-based view. providing a reversed URL to a decorator (such as the login_url argument for the django.contrib.auth.decorators.permission_required() decorator). providing a reversed URL as a default value f

db.models.Func.arity

arity New in Django 1.10. A class attribute that denotes the number of arguments the function accepts. If this attribute is set and the function is called with a different number of expressions, TypeError will be raised. Defaults to None.

db.transaction.non_atomic_requests()

non_atomic_requests(using=None) [source] This decorator will negate the effect of ATOMIC_REQUESTS for a given view: from django.db import transaction @transaction.non_atomic_requests def my_view(request): do_stuff() @transaction.non_atomic_requests(using='other') def my_other_view(request): do_stuff_on_the_other_database() It only works if it’s applied to the view itself.

gis.geoip.GeoIP.country_code_by_addr()

GeoIP.country_code_by_addr(query)