sessions.backends.db.SessionStore.create_model_instance()

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.

forms.Field.has_changed()

Field.has_changed() [source] The has_changed() method is used to determine if the field value has changed from the initial value. Returns True or False. See the Form.has_changed() documentation for more information.

utils.encoding.filepath_to_uri()

filepath_to_uri(path) [source] Convert a file system path to a URI portion that is suitable for inclusion in a URL. The path is assumed to be either UTF-8 or unicode. This method will encode certain characters that would normally be recognized as special characters for URIs. Note that this method does not encode the ‘ character, as it is a valid character within URIs. See encodeURIComponent() JavaScript function for more details. Returns an ASCII string containing the encoded result.

sessions.backends.base.SessionBase.get_expiry_date()

get_expiry_date() Returns the date this session will expire. For sessions with no custom expiration (or those set to expire at browser close), this will equal the date SESSION_COOKIE_AGE seconds from now. This function accepts the same keyword arguments as get_expiry_age().

views.generic.dates.MonthMixin.get_previous_month()

get_previous_month(date) [source] Returns a date object containing the first day of the month 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.

views.generic.dates.BaseWeekArchiveView

class BaseWeekArchiveView [source]

gis.gdal.Layer.field_precisions

field_precisions Returns a list of the numeric precisions for each of the fields in this layer. This is meaningless (and set to zero) for non-numeric fields: >>> layer.field_precisions [0, 0, 15, 0]

test.Response.wsgi_request

wsgi_request The WSGIRequest instance generated by the test handler that generated the response.

Writing your first Django app, part 3

This tutorial begins where Tutorial 2 left off. We’re continuing the Web-poll application and will focus on creating the public interface – “views.” Overview A view is a “type” of Web page in your Django application that generally serves a specific function and has a specific template. For example, in a blog application, you might have the following views: Blog homepage – displays the latest few entries. Entry “detail” page – permalink page for a single entry. Year-based archive page – displays

admin.AdminSite.login_form

AdminSite.login_form Subclass of AuthenticationForm that will be used by the admin site login view.