postgres.operations.CreateExtension

class CreateExtension(name) [source] An Operation subclass which installs PostgreSQL extensions. name This is a required argument. The name of the extension to be installed.

gis.geos.GEOSGeometry.empty

GEOSGeometry.empty Returns whether or not the set of points in the geometry is empty.

sessions.base_session.AbstractBaseSession.session_data

session_data A string containing an encoded and serialized session dictionary.

test.Response.request

request The request data that stimulated the response.

apps.apps.get_model()

apps.get_model(app_label, model_name) Returns the Model with the given app_label and model_name. As a shortcut, this method also accepts a single argument in the form app_label.model_name. model_name is case-insensitive. Raises LookupError if no such application or model exists. Raises ValueError when called with a single argument that doesn’t contain exactly one dot.

utils.encoding.force_bytes()

force_bytes(s, encoding='utf-8', strings_only=False, errors='strict') [source] Similar to smart_bytes, except that lazy instances are resolved to bytestrings, rather than kept as lazy objects. If strings_only is True, don’t convert (some) non-string-like objects.

admin.ModelAdmin.get_prepopulated_fields()

ModelAdmin.get_prepopulated_fields(request, obj=None) The get_prepopulated_fields method is given the HttpRequest and the obj being edited (or None on an add form) and is expected to return a dictionary, as described above in the ModelAdmin.prepopulated_fields section.

gis.db.models.functions.Centroid

class Centroid(expression, **extra) Availability: MySQL, PostGIS, Oracle, SpatiaLite Accepts a single geographic field or expression and returns the centroid value of the geometry.

template.backends.base.Template.render()

Template.render(context=None, request=None) Renders this template with a given context. If context is provided, it must be a dict. If it isn’t provided, the engine will render the template with an empty context. If request is provided, it must be an HttpRequest. Then the engine must make it, as well as the CSRF token, available in the template. How this is achieved is up to each backend. Here’s an example of the search algorithm. For this example the TEMPLATES setting is: TEMPLATES = [ {

sessions.backends.base.SessionBase.__getitem__()

__getitem__(key) Example: fav_color = request.session['fav_color']