gis.gdal.SpatialReference.import_wkt()

import_wkt(wkt) Import spatial reference from WKT.

db.models.Expression.relabeled_clone()

relabeled_clone(change_map) Returns a clone (copy) of self, with any column aliases relabeled. Column aliases are renamed when subqueries are created. relabeled_clone() should also be called on any nested expressions and assigned to the clone. change_map is a dictionary mapping old aliases to new aliases. Example: def relabeled_clone(self, change_map): clone = copy.copy(self) clone.expression = self.expression.relabeled_clone(change_map) return clone

utils.feedgenerator.SyndicationFeed.root_attributes()

root_attributes() [source] Return extra attributes to place on the root (i.e. feed/channel) element. Called from write().

Databases

Django attempts to support as many features as possible on all database backends. However, not all database backends are alike, and we’ve had to make design decisions on which features to support and which assumptions we can make safely. This file describes some of the features that might be relevant to Django usage. Of course, it is not intended as a replacement for server-specific documentation or reference manuals. General notes Persistent connections Persistent connections avoid the overhea

views.generic.edit.ModelFormMixin.model

model A model class. Can be explicitly provided, otherwise will be determined by examining self.object or queryset.

core.files.uploadhandler.MemoryFileUploadHandler

class MemoryFileUploadHandler [source] File upload handler to stream uploads into memory (used for small files).

dispatch.Signal.send_robust()

Signal.send_robust(sender, **kwargs) [source] To send a signal, call either Signal.send() (all built-in signals use this) or Signal.send_robust(). You must provide the sender argument (which is a class most of the time) and may provide as many other keyword arguments as you like. For example, here’s how sending our pizza_done signal might look: class PizzaStore(object): ... def send_pizza(self, toppings, size): pizza_done.send(sender=self.__class__, toppings=toppings, size=s

core.files.uploadhandler.FileUploadHandler.upload_complete()

FileUploadHandler.upload_complete() [source] Callback signaling that the entire upload (all files) has completed.

core.files.uploadedfile.UploadedFile.chunks()

UploadedFile.chunks(chunk_size=None) A generator returning chunks of the file. If multiple_chunks() is True, you should use this method in a loop instead of read(). In practice, it’s often easiest simply to use chunks() all the time. Looping over chunks() instead of using read() ensures that large files don’t overwhelm your system’s memory. Here are some useful attributes of UploadedFile:

views.decorators.csrf.csrf_exempt()

csrf_exempt(view) [source] This decorator marks a view as being exempt from the protection ensured by the middleware. Example: from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse @csrf_exempt def my_view(request): return HttpResponse('Hello world')