contenttypes.admin.GenericInlineModelAdmin.ct_fk_field

ct_fk_field The name of the integer field that represents the ID of the related object. Defaults to object_id.

gis.geoip.GeoIP.record_by_addr()

GeoIP.record_by_addr(query)

sessions.backends.base.SessionBase.__delitem__()

__delitem__(key) Example: del request.session['fav_color']. This raises KeyError if the given key isn’t already in the session.

db.models.Model.get_absolute_url()

Model.get_absolute_url() Define a get_absolute_url() method to tell Django how to calculate the canonical URL for an object. To callers, this method should appear to return a string that can be used to refer to the object over HTTP. For example: def get_absolute_url(self): return "/people/%i/" % self.id While this code is correct and simple, it may not be the most portable way to to write this kind of method. The reverse() function is usually the best approach. For example: def get_abso

core.files.storage.Storage.listdir()

listdir(path) [source] Lists the contents of the specified path, returning a 2-tuple of lists; the first item being directories, the second item being files. For storage systems that aren’t able to provide such a listing, this will raise a NotImplementedError instead.

db.models.signals.pre_init

django.db.models.signals.pre_init Whenever you instantiate a Django model, this signal is sent at the beginning of the model’s __init__() method. Arguments sent with this signal:

db.models.ManyToManyField.db_table

ManyToManyField.db_table The name of the table to create for storing the many-to-many data. If this is not provided, Django will assume a default name based upon the names of: the table for the model defining the relationship and the name of the field itself.

db.models.query.QuerySet.defer()

defer(*fields) In some complex data-modeling situations, your models might contain a lot of fields, some of which could contain a lot of data (for example, text fields), or require expensive processing to convert them to Python objects. If you are using the results of a queryset in some situation where you don’t know if you need those particular fields when you initially fetch the data, you can tell Django not to retrieve them from the database. This is done by passing the names of the field

test.Response.content

content The body of the response, as a bytestring. This is the final page content as rendered by the view, or any error message.

admin.ModelAdmin.get_fieldsets()

ModelAdmin.get_fieldsets(request, obj=None) The get_fieldsets method is given the HttpRequest and the obj being edited (or None on an add form) and is expected to return a list of two-tuples, in which each two-tuple represents a <fieldset> on the admin form page, as described above in the ModelAdmin.fieldsets section.