test.SimpleTestCase.assertJSONNotEqual()

SimpleTestCase.assertJSONNotEqual(raw, expected_data, msg=None) [source] Asserts that the JSON fragments raw and expected_data are not equal. See assertJSONEqual() for further details. Output in case of error can be customized with the msg argument.

gis.db.models.GeoQuerySet.translate()

GeoQuerySet.translate(x, y, z=0.0, **kwargs) Deprecated since version 1.9: Use the Translate function instead. Availability: PostGIS, SpatiaLite Translates the geometry field to a new location using the given numeric parameters as offsets.

db.models.Field.model

Field.model Returns the model on which the field is defined. If a field is defined on a superclass of a model, model will refer to the superclass, not the class of the instance.

db.models.Field.deconstruct()

deconstruct() [source] Returns a 4-tuple with enough information to recreate the field: The name of the field on the model. The import path of the field (e.g. "django.db.models.IntegerField"). This should be the most portable version, so less specific may be better. A list of positional arguments. A dict of keyword arguments. This method must be added to fields prior to 1.7 to migrate its data using Migrations.

db.models.query.QuerySet.distinct()

distinct(*fields) Returns a new QuerySet that uses SELECT DISTINCT in its SQL query. This eliminates duplicate rows from the query results. By default, a QuerySet will not eliminate duplicate rows. In practice, this is rarely a problem, because simple queries such as Blog.objects.all() don’t introduce the possibility of duplicate result rows. However, if your query spans multiple tables, it’s possible to get duplicate results when a QuerySet is evaluated. That’s when you’d use distinct(). N

db.models.DateField

class DateField(auto_now=False, auto_now_add=False, **options) [source] A date, represented in Python by a datetime.date instance. Has a few extra, optional arguments:

admin.ModelAdmin.get_urls()

ModelAdmin.get_urls() [source] The get_urls method on a ModelAdmin returns the URLs to be used for that ModelAdmin in the same way as a URLconf. Therefore you can extend them as documented in URL dispatcher: class MyModelAdmin(admin.ModelAdmin): def get_urls(self): urls = super(MyModelAdmin, self).get_urls() my_urls = [ url(r'^my_view/$', self.my_view), ] return my_urls + urls def my_view(self, request): # ... context = dic

forms.NullBooleanSelect

class NullBooleanSelect [source] Select widget with options ‘Unknown’, ‘Yes’ and ‘No’

gis.geos.GEOSGeometry.convex_hull

GEOSGeometry.convex_hull Returns the smallest Polygon that contains all the points in the geometry.

core.files.storage.Storage.open()

open(name, mode='rb') [source] Opens the file given by name. Note that although the returned file is guaranteed to be a File object, it might actually be some subclass. In the case of remote file storage this means that reading/writing could be quite slow, so be warned.