views.generic.dates.MonthMixin.get_month_format()

get_month_format() [source] Returns the strftime() format to use when parsing the month. Returns month_format by default.

auth.models.CustomUser.get_full_name()

get_full_name() A longer formal identifier for the user. A common interpretation would be the full name of the user, but it can be any string that identifies the user.

views.generic.base.View.http_method_names

http_method_names The list of HTTP method names that this view will accept. Default: ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'] Methods

test.runner.DiscoverRunner.teardown_test_environment()

DiscoverRunner.teardown_test_environment(**kwargs) Restores the pre-test environment.

forms.TimeField.input_formats

input_formats A list of formats used to attempt to convert a string to a valid datetime.time object. If no input_formats argument is provided, the default input formats are: '%H:%M:%S', # '14:30:59' '%H:%M', # '14:30'

gis.gdal.SpatialReference.srid

srid Returns the SRID of top-level authority, or None if undefined.

gis.db.models.Extent

class Extent(geo_field) Availability: PostGIS, Oracle, SpatiaLite Returns the extent of all geo_field in the QuerySet as a four-tuple, comprising the lower left coordinate and the upper right coordinate. Example: >>> qs = City.objects.filter(name__in=('Houston', 'Dallas')).aggregate(Extent('poly')) >>> print(qs['poly__extent']) (-96.8016128540039, 29.7633724212646, -95.3631439208984, 32.782058715820)

gis.gdal.Polygon.shell

shell Returns the shell or exterior ring of this polygon, as a LinearRing geometry.

forms.BoundField.help_text

BoundField.help_text The help_text of the field.

Outputting CSV with Django

This document explains how to output CSV (Comma Separated Values) dynamically using Django views. To do this, you can either use the Python CSV library or the Django template system. Using the Python CSV library Python comes with a CSV library, csv. The key to using it with Django is that the csv module’s CSV-creation capability acts on file-like objects, and Django’s HttpResponse objects are file-like objects. Here’s an example: import csv from django.http import HttpResponse def some_view(re