db.models.query.QuerySet.exists()

exists() Returns True if the QuerySet contains any results, and False if not. This tries to perform the query in the simplest and fastest way possible, but it does execute nearly the same query as a normal QuerySet query. exists() is useful for searches relating to both object membership in a QuerySet and to the existence of any objects in a QuerySet, particularly in the context of a large QuerySet. The most efficient method of finding whether a model with a unique field (e.g. primary_key) i

views.generic.dates.BaseYearArchiveView

class BaseYearArchiveView [source]

gis.gdal.OGRGeometry.ewkt

ewkt Returns the EWKT representation of this geometry.

forms.Field.clean()

Field.clean(value) [source] Although the primary way you’ll use Field classes is in Form classes, you can also instantiate them and use them directly to get a better idea of how they work. Each Field instance has a clean() method, which takes a single argument and either raises a django.forms.ValidationError exception or returns the clean value: >>> from django import forms >>> f = forms.EmailField() >>> f.clean('foo@example.com') 'foo@example.com' >>> f.c

test.runner.DiscoverRunner.run_suite()

DiscoverRunner.run_suite(suite, **kwargs) Runs the test suite. Returns the result produced by the running the test suite.

core.paginator.Paginator.num_pages

Paginator.num_pages The total number of pages.

core.files.File.multiple_chunks()

multiple_chunks(chunk_size=None) [source] Returns True if the file is large enough to require multiple chunks to access all of its content give some chunk_size.

postgres.search.TrigramSimilarity

class TrigramSimilarity(expression, string, **extra) [source] New in Django 1.10. Accepts a field name or expression, and a string or expression. Returns the trigram similarity between the two arguments. Usage example: >>> from django.contrib.postgres.search import TrigramSimilarity >>> Author.objects.create(name='Katy Stevens') >>> Author.objects.create(name='Stephen Keats') >>> test = 'Katie Stephens' >>> Author.objects.annotate( ... simil

db.models.Field.one_to_many

Field.one_to_many Boolean flag that is True if the field has a one-to-many relation, such as a GenericRelation or the reverse of a ForeignKey; False otherwise.

db.models.Field.db_tablespace

Field.db_tablespace The name of the database tablespace to use for this field’s index, if this field is indexed. The default is the project’s DEFAULT_INDEX_TABLESPACE setting, if set, or the db_tablespace of the model, if any. If the backend doesn’t support tablespaces for indexes, this option is ignored.