postgres.search.SearchVectorField

class SearchVectorField [source] If this approach becomes too slow, you can add a SearchVectorField to your model. You’ll need to keep it populated with triggers, for example, as described in the PostgreSQL documentation. You can then query the field as if it were an annotated SearchVector: >>> Entry.objects.update(search_vector=SearchVector('body_text')) >>> Entry.objects.filter(search_vector='cheese') [<Entry: Cheese on Toast recipes>, <Entry: Pizza recipes>]

admin.InlineModelAdmin.can_delete

InlineModelAdmin.can_delete Specifies whether or not inline objects can be deleted in the inline. Defaults to True.

gis.admin.GeoModelAdmin.map_template

map_template Override the template used to generate the JavaScript slippy map. Default is 'gis/admin/openlayers.html'.

sitemaps.views.sitemap()

views.sitemap(request, sitemaps, section=None, template_name='sitemap.xml', content_type='application/xml') To activate sitemap generation on your Django site, add this line to your URLconf: from django.contrib.sitemaps.views import sitemap url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap') This tells Django to build a sitemap when a client accesses /sitemap.xml. The name of the sitemap file is not important, but the location is. Searc

template.response.SimpleTemplateResponse.__init__()

SimpleTemplateResponse.__init__(template, context=None, content_type=None, status=None, charset=None, using=None) [source] Instantiates a SimpleTemplateResponse object with the given template, context, content type, HTTP status, and charset. template A backend-dependent template object (such as those returned by get_template()), the name of a template, or a list of template names. context A dict of values to add to the template context. By default, this is an empty dictionary. content_t

admin.ModelAdmin.get_search_fields()

ModelAdmin.get_search_fields(request) [source] The get_search_fields method is given the HttpRequest and is expected to return the same kind of sequence type as for the search_fields attribute.

core.checks.register()

register(*tags)(function) You can pass as many tags to register as you want in order to label your check. Tagging checks is useful since it allows you to run only a certain group of checks. For example, to register a compatibility check, you would make the following call: from django.core.checks import register, Tags @register(Tags.compatibility) def my_check(app_configs, **kwargs): # ... perform compatibility checks and collect errors return errors You can register “deployment che

gis.geos.WKBWriter

class WKBWriter(dim=2) WKBWriter provides the most control over its output. By default it returns OGC-compliant WKB when its write method is called. However, it has properties that allow for the creation of EWKB, a superset of the WKB standard that includes additional information. See the WKBWriter.outdim documentation for more details about the dim argument. Changed in Django 1.10: The ability to pass the dim argument to the constructor was added. write(geom) Returns the WKB of the g

db.models.fields.related.RelatedManager.create()

create(**kwargs) Creates a new object, saves it and puts it in the related object set. Returns the newly created object: >>> b = Blog.objects.get(id=1) >>> e = b.entry_set.create( ... headline='Hello', ... body_text='Hi', ... pub_date=datetime.date(2005, 1, 1) ... ) # No need to call e.save() at this point -- it's already been saved. This is equivalent to (but much simpler than): >>> b = Blog.objects.get(id=1) >>> e = Entry( ... blog=b, .

admin.ModelAdmin.get_changelist()

ModelAdmin.get_changelist(request, **kwargs) [source] Returns the Changelist class to be used for listing. By default, django.contrib.admin.views.main.ChangeList is used. By inheriting this class you can change the behavior of the listing.