gis.gdal.GDALRaster.origin

origin Coordinates of the top left origin of the raster in the spatial reference system of the source, as a point object with x and y members. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326}) >>> rst.origin [0.0, 0.0] >>> rst.origin.x = 1 >>> rst.origin [1.0, 0.0]

views.generic.dates.DayMixin.get_previous_day()

get_previous_day(date) [source] Returns a date object containing the previous valid day. This function can also return None or raise an Http404 exception, depending on the values of allow_empty and allow_future.

forms.ChoiceField.choices

choices Either an iterable (e.g., a list or tuple) of 2-tuples to use as choices for this field, or a callable that returns such an iterable. This argument accepts the same formats as the choices argument to a model field. See the model field reference documentation on choices for more details. If the argument is a callable, it is evaluated each time the field’s form is initialized.

http.HttpResponseNotAllowed

class HttpResponseNotAllowed [source] Like HttpResponse, but uses a 405 status code. The first argument to the constructor is required: a list of permitted methods (e.g. ['GET', 'POST']).

contrib packages

Django aims to follow Python’s “batteries included” philosophy. It ships with a variety of extra, optional tools that solve common Web-development problems. This code lives in django/contrib in the Django distribution. This document gives a rundown of the packages in contrib, along with any dependencies those packages have. Note For most of these add-ons – specifically, the add-ons that include either models or template tags – you’ll need to add the package name (e.g., 'django.contrib.redirect

forms.TimeInput

class TimeInput [source] Time input as a simple text box: <input type='text' ...> Takes same arguments as TextInput, with one more optional argument: format The format in which this field’s initial value will be displayed. If no format argument is provided, the default format is the first format found in TIME_INPUT_FORMATS and respects Format localization. For the treatment of microseconds, see DateTimeInput.

gis.forms.MultiPolygonField

class MultiPolygonField

core.validators.URLValidator.schemes

schemes URL/URI scheme list to validate against. If not provided, the default list is ['http', 'https', 'ftp', 'ftps']. As a reference, the IANA website provides a full list of valid URI schemes.

auth.models.CustomUserManager.create_user()

create_user(*username_field*, password=None, **other_fields) The prototype of create_user() should accept the username field, plus all required fields as arguments. For example, if your user model uses email as the username field, and has date_of_birth as a required field, then create_user should be defined as: def create_user(self, email, date_of_birth, password=None): # create user here ...

urls.get_script_prefix()

get_script_prefix() [source] Normally, you should always use reverse() to define URLs within your application. However, if your application constructs part of the URL hierarchy itself, you may occasionally need to generate URLs. In that case, you need to be able to find the base URL of the Django project within its Web server (normally, reverse() takes care of this for you). In that case, you can call get_script_prefix(), which will return the script prefix portion of the URL for your Django