sessions.backends.db.SessionStore

class backends.db.SessionStore Implements database-backed session store. classmethod get_model_class() New in Django 1.9. Override this method to return a custom session model if you need one. create_model_instance(data) New in Django 1.9. Returns a new instance of the session model object, which represents the current session state. Overriding this method provides the ability to modify session model data before it’s saved to database.

http.QueryDict.items()

QueryDict.items() Just like the standard dictionary items() method, except this uses the same last-value logic as __getitem__(). For example: >>> q = QueryDict('a=1&a=2&a=3') >>> q.items() [('a', '3')]

gis.geos.GEOSGeometry.ewkb

GEOSGeometry.ewkb Return the EWKB representation of this Geometry as a Python buffer. This is an extension of the WKB specification that includes any SRID value that are a part of this geometry.

views.decorators.cache.never_cache()

never_cache(view_func) [source] This decorator adds a Cache-Control: max-age=0, no-cache, no-store, must-revalidate header to a response to indicate that a page should never be cached. Changed in Django 1.9: Before Django 1.9, Cache-Control: max-age=0 was sent. This didn’t reliably prevent caching in all browsers.

gis.db.models.functions.IsValid

class IsValid(expr) New in Django 1.10. Availability: PostGIS Accepts a geographic field or expression and tests if the value is well formed. Returns True if its value is a valid geometry and False otherwise.

template.Library.assignment_tag()

django.template.Library.assignment_tag() Deprecated since version 1.9: simple_tag can now store results in a template variable and should be used instead. To ease the creation of tags setting a variable in the context, Django provides a helper function, assignment_tag. This function works the same way as simple_tag() except that it stores the tag’s result in a specified context variable instead of directly outputting it. Our earlier current_time function could thus be written like this: @r

Internationalization and localization

Overview The goal of internationalization and localization is to allow a single Web application to offer its content in languages and formats tailored to the audience. Django has full support for translation of text, formatting of dates, times and numbers, and time zones. Essentially, Django does two things: It allows developers and template authors to specify which parts of their apps should be translated or formatted for local languages and cultures. It uses these hooks to localize Web apps f

core.files.images.ImageFile

class ImageFile(file_object) [source] Django provides a built-in class specifically for images. django.core.files.images.ImageFile inherits all the attributes and methods of File, and additionally provides the following: width Width of the image in pixels. height Height of the image in pixels.

utils.http.cookie_date()

cookie_date(epoch_seconds=None) [source] Formats the time to ensure compatibility with Netscape’s cookie standard. Accepts a floating point number expressed in seconds since the epoch in UTC–such as that outputted by time.time(). If set to None, defaults to the current time. Outputs a string in the format Wdy, DD-Mon-YYYY HH:MM:SS GMT.

forms.RegexField.strip

strip New in Django 1.9. Defaults to False. If enabled, stripping will be applied before the regex validation.