views.generic.dates.TodayArchiveView

class TodayArchiveView [source] A day archive page showing all objects for today. This is exactly the same as django.views.generic.dates.DayArchiveView, except today’s date is used instead of the year/month/day arguments. Ancestors (MRO) django.views.generic.list.MultipleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseTodayArchiveView django.views.generic.dates.BaseDayArchiveView django.views.generic.dates.YearMixin django.views.gene

views.generic.dates.DayMixin.day

day Optional The value for the day, as a string. By default, set to None, which means the day will be determined using other means.

GeoDjango Utilities

The django.contrib.gis.utils module contains various utilities that are useful in creating geospatial Web applications. LayerMapping data import utilityExample LayerMapping API Troubleshooting OGR Inspectionogrinspect mapping GeoJSON Serializer

db.models.Model.save()

Model.save(force_insert=False, force_update=False, using=DEFAULT_DB_ALIAS, update_fields=None) [source] If you want customized saving behavior, you can override this save() method. See Overriding predefined model methods for more details. The model save process also has some subtleties; see the sections below.

gis.gdal.SpatialReference.proj

proj Returns the PROJ.4 representation for this spatial reference.

gis.gdal.SpatialReference.import_xml()

import_xml(xml) Import spatial reference from XML.

views.generic.base.RedirectView.get_redirect_url()

get_redirect_url(*args, **kwargs) Constructs the target URL for redirection. The default implementation uses url as a starting string and performs expansion of % named parameters in that string using the named groups captured in the URL. If url is not set, get_redirect_url() tries to reverse the pattern_name using what was captured in the URL (both named and unnamed groups are used). If requested by query_string, it will also append the query string to the generated URL. Subclasses may imple

gis.db.models.functions.Perimeter

class Perimeter(expression, **extra) Availability: PostGIS, Oracle, SpatiaLite (≥ 4.0) Accepts a single geographic field or expression and returns the perimeter of the geometry field as a Distance object. On MySQL, a raw float value is returned, as it’s not possible to automatically determine the unit of the field.

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>&

gis.geoip.GeoIP.lon_lat()

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