db.models.Options.db_tablespace

Options.db_tablespace The name of the database tablespace to use for this model. The default is the project’s DEFAULT_TABLESPACE setting, if set. If the backend doesn’t support tablespaces, this option is ignored.

gis.gdal.GDALRaster.scale

scale Pixel width and height used for georeferencing the raster, as a as a point object with x and y members. See geotransform for more information. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326}) >>> rst.scale [1.0, -1.0] >>> rst.scale.x = 2 >>> rst.scale [2.0, -1.0]

gis.gdal.SpatialReference.validate()

validate() Checks to see if the given spatial reference is valid, if not an exception will be raised.

utils.feedgenerator.SyndicationFeed.add_root_elements()

add_root_elements(handler) [source] Add elements in the root (i.e. feed/channel) element. Called from write().

gis.geoip.GeoIP.city()

GeoIP.city(query) Returns a dictionary of city information for the given query. Some of the values in the dictionary may be undefined (None).

gis.feeds.Feed.geometry()

geometry(obj) Takes the object returned by get_object() and returns the feed’s geometry. Typically this is a GEOSGeometry instance, or can be a tuple to represent a point or a box. For example: class ZipcodeFeed(Feed): def geometry(self, obj): # Can also return: `obj.poly`, and `obj.poly.centroid`. return obj.poly.extent # tuple like: (X0, Y0, X1, Y1).

gis.gdal.Envelope.ur

ur The upper-right coordinate, as a tuple.

views.generic.list.MultipleObjectMixin.get_allow_empty()

get_allow_empty() Return a boolean specifying whether to display the page if no objects are available. If this method returns False and no objects are available, the view will raise a 404 instead of displaying an empty page. By default, this is True.

db.transaction.atomic()

atomic(using=None, savepoint=True) [source] Atomicity is the defining property of database transactions. atomic allows us to create a block of code within which the atomicity on the database is guaranteed. If the block of code is successfully completed, the changes are committed to the database. If there is an exception, the changes are rolled back. atomic blocks can be nested. In this case, when an inner block completes successfully, its effects can still be rolled back if an exception is r

Form Assets (the Media class)

Rendering an attractive and easy-to-use Web form requires more than just HTML - it also requires CSS stylesheets, and if you want to use fancy “Web2.0” widgets, you may also need to include some JavaScript on each page. The exact combination of CSS and JavaScript that is required for any given page will depend upon the widgets that are in use on that page. This is where asset definitions come in. Django allows you to associate different files – like stylesheets and scripts – with the forms and