utils.encoding.smart_text()

smart_text(s, encoding='utf-8', strings_only=False, errors='strict') [source] Returns a text object representing s – unicode on Python 2 and str on Python 3. Treats bytestrings using the encoding codec. If strings_only is True, don’t convert (some) non-string-like objects.

auth.backends.ModelBackend.get_user_permissions()

get_user_permissions(user_obj, obj=None) Returns the set of permission strings the user_obj has from their own user permissions. Returns an empty set if is_anonymous or is_active is False.

db.models.query.QuerySet.annotate()

annotate(*args, **kwargs) Annotates each object in the QuerySet with the provided list of query expressions. An expression may be a simple value, a reference to a field on the model (or any related models), or an aggregate expression (averages, sums, etc.) that has been computed over the objects that are related to the objects in the QuerySet. Each argument to annotate() is an annotation that will be added to each object in the QuerySet that is returned. The aggregation functions that are pr

db.models.Transform.bilateral

bilateral A boolean indicating whether this transformation should apply to both lhs and rhs. Bilateral transformations will be applied to rhs in the same order as they appear in the lookup expression. By default it is set to False. For example usage, see Custom Lookups.

apps.AppConfig.name

AppConfig.name Full Python path to the application, e.g. 'django.contrib.admin'. This attribute defines which application the configuration applies to. It must be set in all AppConfig subclasses. It must be unique across a Django project.

db.models.fields.files.FieldFile.size

FieldFile.size The result of the underlying Storage.size() method.

sessions.middleware.SessionMiddleware

class SessionMiddleware [source] Enables session support. See the session documentation.

views.generic.edit.ModelFormMixin.get_success_url()

get_success_url() Determine the URL to redirect to when the form is successfully validated. Returns django.views.generic.edit.ModelFormMixin.success_url if it is provided; otherwise, attempts to use the get_absolute_url() of the object.

db.models.fields.files.FieldFile.open()

FieldFile.open(mode='rb') [source] Opens or reopens the file associated with this instance in the specified mode. Unlike the standard Python open() method, it doesn’t return a file descriptor. Since the underlying file is opened implicitly when accessing it, it may be unnecessary to call this method except to reset the pointer to the underlying file or to change the mode.

db.models.fields.files.FieldFile.delete()

FieldFile.delete(save=True) [source] Deletes the file associated with this instance and clears all attributes on the field. Note: This method will close the file if it happens to be open when delete() is called. The optional save argument controls whether or not the model instance is saved after the file associated with this field has been deleted. Defaults to True. Note that when a model is deleted, related files are not deleted. If you need to cleanup orphaned files, you’ll need to handle