postgres.forms.SplitArrayField.size

size This is the fixed number of times the underlying field will be used.

utils.module_loading.import_string()

import_string(dotted_path) [source] Imports a dotted module path and returns the attribute/class designated by the last name in the path. Raises ImportError if the import failed. For example: from django.utils.module_loading import import_string ValidationError = import_string('django.core.exceptions.ValidationError') is equivalent to: from django.core.exceptions import ValidationError

middleware.locale.LocaleMiddleware

class LocaleMiddleware [source] Enables language selection based on data from the request. It customizes content for each user. See the internationalization documentation.

forms.Widget.supports_microseconds

supports_microseconds An attribute that defaults to True. If set to False, the microseconds part of datetime and time values will be set to 0. New in Django 1.9: In older versions, this attribute was only defined on the date and time widgets (as False).

forms.models.modelform_factory()

modelform_factory(model, form=ModelForm, fields=None, exclude=None, formfield_callback=None, widgets=None, localized_fields=None, labels=None, help_texts=None, error_messages=None, field_classes=None) [source] Returns a ModelForm class for the given model. You can optionally pass a form argument to use as a starting point for constructing the ModelForm. fields is an optional list of field names. If provided, only the named fields will be included in the returned fields. exclude is an optiona

sessions.base_session.AbstractBaseSession.session_key

session_key Primary key. The field itself may contain up to 40 characters. The current implementation generates a 32-character string (a random sequence of digits and lowercase ASCII letters).

Handling HTTP requests

Information on handling HTTP requests in Django: URL dispatcher Writing views View decorators File Uploads Django shortcut functions Generic views Middleware How to use sessions

auth.models.AbstractBaseUser

class models.AbstractBaseUser get_username() Returns the value of the field nominated by USERNAME_FIELD. clean() New in Django 1.10. Normalizes the username by calling normalize_username(). If you override this method, be sure to call super() to retain the normalization. classmethod normalize_username(username) New in Django 1.10. Applies NFKC Unicode normalization to usernames so that visually identical characters with different Unicode code points are considered identica

Upgrading Django to a newer version

While it can be a complex process at times, upgrading to the latest Django version has several benefits: New features and improvements are added. Bugs are fixed. Older version of Django will eventually no longer receive security updates. (see Supported versions). Upgrading as each new Django release is available makes future upgrades less painful by keeping your code base up to date. Here are some things to consider to help make your upgrade process as smooth as possible. Required Reading If

Search

A common task for web applications is to search some data in the database with user input. In a simple case, this could be filtering a list of objects by a category. A more complex use case might require searching with weighting, categorization, highlighting, multiple languages, and so on. This document explains some of the possible use cases and the tools you can use. We’ll refer to the same models used in Making queries. Use Cases Standard textual queries Text-based fields have a selection of