gis.gdal.GDALRaster.srs

srs The spatial reference system of the raster, as a SpatialReference instance. The SRS can be changed by setting it to an other SpatialReference or providing any input that is accepted by the SpatialReference constructor. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326}) >>> rst.srs.srid 4326 >>> rst.srs = 3086 >>> rst.srs.srid 3086

forms.ModelForm

class ModelForm [source] If you’re building a database-driven app, chances are you’ll have forms that map closely to Django models. For instance, you might have a BlogComment model, and you want to create a form that lets people submit comments. In this case, it would be redundant to define the field types in your form, because you’ve already defined the fields in your model. For this reason, Django provides a helper class that lets you create a Form class from a Django model. For example: &

views.i18n.JavaScriptCatalog.packages

packages A list of application names among installed applications. Those apps should contain a locale directory. All those catalogs plus all catalogs found in LOCALE_PATHS (which are always included) are merged into one catalog. Defaults to None, which means that all available translations from all INSTALLED_APPS are provided in the JavaScript output. Example with default values: from django.views.i18n import JavaScriptCatalog urlpatterns = [ url(r'^jsi18n/$', JavaScriptCatalog.as_view(

admin.ModelAdmin.empty_value_display

ModelAdmin.empty_value_display New in Django 1.9. This attribute overrides the default display value for record’s fields that are empty (None, empty string, etc.). The default value is - (a dash). For example: from django.contrib import admin class AuthorAdmin(admin.ModelAdmin): empty_value_display = '-empty-' You can also override empty_value_display for all admin pages with AdminSite.empty_value_display, or for specific fields like this: from django.contrib import admin class Auth

views.i18n.JavaScriptCatalog

class JavaScriptCatalog [source] A view that produces a JavaScript code library with functions that mimic the gettext interface, plus an array of translation strings. Attributes domain Translation domain containing strings to add in the view output. Defaults to 'djangojs'. packages A list of application names among installed applications. Those apps should contain a locale directory. All those catalogs plus all catalogs found in LOCALE_PATHS (which are always included) are merged in

db.models.Field.auto_created

Field.auto_created Boolean flag that indicates if the field was automatically created, such as the OneToOneField used by model inheritance.

views.generic.base.TemplateResponseMixin

class django.views.generic.base.TemplateResponseMixin Provides a mechanism to construct a TemplateResponse, given suitable context. The template to use is configurable and can be further customized by subclasses. Attributes template_name The full name of a template to use as defined by a string. Not defining a template_name will raise a django.core.exceptions.ImproperlyConfigured exception. template_engine The NAME of a template engine to use for loading the template. template_engin

gis.gdal.SpatialReference.identify_epsg()

identify_epsg() This method inspects the WKT of this SpatialReference and will add EPSG authority nodes where an EPSG identifier is applicable.

gis.db.models.GeoQuerySet.point_on_surface()

GeoQuerySet.point_on_surface(**kwargs) Deprecated since version 1.9: Use the PointOnSurface function instead. Availability: PostGIS, Oracle, SpatiaLite Returns a Point geometry guaranteed to lie on the surface of the geometry field in a point_on_surface attribute on each element of the queryset; otherwise sets with None.

test.TransactionTestCase.assertNumQueries()

TransactionTestCase.assertNumQueries(num, func, *args, **kwargs) [source] Asserts that when func is called with *args and **kwargs that num database queries are executed. If a "using" key is present in kwargs it is used as the database alias for which to check the number of queries. If you wish to call a function with a using parameter you can do it by wrapping the call with a lambda to add an extra parameter: self.assertNumQueries(7, lambda: my_function(using=7)) You can also use this as a