utils.safestring.SafeString

class SafeString A str subclass that has been specifically marked as “safe” (requires no further escaping) for HTML output purposes. This is SafeBytes on Python 2 and SafeText on Python 3.

views.generic.dates.BaseDateListView.get_dated_queryset()

get_dated_queryset(**lookup) [source] Returns a queryset, filtered using the query arguments defined by lookup. Enforces any restrictions on the queryset, such as allow_empty and allow_future.

Performance and optimization

This document provides an overview of techniques and tools that can help get your Django code running more efficiently - faster, and using fewer system resources. Introduction Generally one’s first concern is to write code that works, whose logic functions as required to produce the expected output. Sometimes, however, this will not be enough to make the code work as efficiently as one would like. In this case, what’s needed is something - and in practice, often a collection of things - to impr

gis.gdal.OGRGeometry.geom_name

geom_name Returns the name of the type of this geometry: >>> polygon.geom_name 'POLYGON'

sites.requests.RequestSite.__init__()

__init__(request) Sets the name and domain attributes to the value of get_host().

admin.InlineModelAdmin.get_formset()

InlineModelAdmin.get_formset(request, obj=None, **kwargs) Returns a BaseInlineFormSet class for use in admin add/change views. See the example for ModelAdmin.get_formsets_with_inlines.

gis.db.models.functions.MemSize

class MemSize(expression, **extra) Availability: PostGIS Accepts a single geographic field or expression and returns the memory size (number of bytes) that the geometry field takes.

db.models.fields.files.FieldFile.name

FieldFile.name The name of the file including the relative path from the root of the Storage of the associated FileField.

gis.gdal.GeometryCollection

class GeometryCollection add(geom) Adds a geometry to this geometry collection. Not applicable to other geometry types.

gis.widgets.OSMWidget

class OSMWidget This widget uses an OpenStreetMap base layer (Mapnik) to display geographic objects on. template_name is gis/openlayers-osm.html. The OpenLayersWidget note about JavaScript file hosting above also applies here. See also this FAQ answer about https access to map tiles.