db.models.functions.Concat

class Concat(*expressions, **extra) [source] Accepts a list of at least two text fields or expressions and returns the concatenated text. Each argument must be of a text or char type. If you want to concatenate a TextField() with a CharField(), then be sure to tell Django that the output_field should be a TextField(). This is also required when concatenating a Value as in the example below. This function will never have a null result. On backends where a null argument results in the entire e

gis.db.models.GeometryField.geography

GeometryField.geography If set to True, this option will create a database column of type geography, rather than geometry. Please refer to the geography type section below for more details. Note Geography support is limited to PostGIS and will force the SRID to be 4326.

db.models.Options.unique_together

Options.unique_together Sets of field names that, taken together, must be unique: unique_together = (("driver", "restaurant"),) This is a tuple of tuples that must be unique when considered together. It’s used in the Django admin and is enforced at the database level (i.e., the appropriate UNIQUE statements are included in the CREATE TABLE statement). For convenience, unique_together can be a single tuple when dealing with a single set of fields: unique_together = ("driver", "restaurant")

db.models.as_sql()

as_sql(self, compiler, connection) Responsible for producing the query string and parameters for the expression. The compiler is an SQLCompiler object, which has a compile() method that can be used to compile other expressions. The connection is the connection used to execute the query. Calling expression.as_sql() is usually incorrect - instead compiler.compile(expression) should be used. The compiler.compile() method will take care of calling vendor-specific methods of the expression. Custo

gis.db.models.GeoQuerySet.reverse_geom()

GeoQuerySet.reverse_geom(**kwargs) Deprecated since version 1.9: Use the Reverse function instead. Availability: PostGIS, Oracle Reverse the coordinate order of the geometry field, and attaches as a reverse attribute on each element of the queryset.

db.models.options.Options.get_fields()

Options.get_fields(include_parents=True, include_hidden=False) [source] Returns a tuple of fields associated with a model. get_fields() accepts two parameters that can be used to control which fields are returned: include_parents True by default. Recursively includes fields defined on parent classes. If set to False, get_fields() will only search for fields declared directly on the current model. Fields from models that directly inherit from abstract models or proxy classes are considered

gis.geoip.GeoIP.lon_lat()

GeoIP.lon_lat(query) Returns a coordinate tuple of (longitude, latitude).

gis.db.models.GeoQuerySet.kml()

GeoQuerySet.kml(**kwargs) Deprecated since version 1.9: Use the AsKML function instead. Availability: PostGIS, SpatiaLite Attaches a kml attribute to every model in the queryset that contains the Keyhole Markup Language (KML) representation of the geometry fields. It should be noted that the contents of the KML are transformed to WGS84 if necessary. Example: >>> qs = Zipcode.objects.all().kml() >>> print(qs[0].kml) <Polygon><outerBoundaryIs><LinearRing>&

utils.cache.patch_vary_headers()

patch_vary_headers(response, newheaders) [source] Adds (or updates) the Vary header in the given HttpResponse object. newheaders is a list of header names that should be in Vary. Existing headers in Vary aren’t removed.

views.generic.base.View.http_method_not_allowed()

http_method_not_allowed(request, *args, **kwargs) If the view was called with a HTTP method it doesn’t support, this method is called instead. The default implementation returns HttpResponseNotAllowed with a list of allowed methods in plain text.