db.backends.base.schema.BaseDatabaseSchemaEditor.add_field()

BaseDatabaseSchemaEditor.add_field(model, field) [source] Adds a column (or sometimes multiple) to the model’s table to represent the field. This will also add indexes or a unique constraint if the field has db_index=True or unique=True. If the field is a ManyToManyField without a value for through, instead of creating a column, it will make a table to represent the relationship. If through is provided, it is a no-op. If the field is a ForeignKey, this will also add the foreign key constrain

http.HttpResponse.__setitem__()

HttpResponse.__setitem__(header, value) Sets the given header name to the given value. Both header and value should be strings.

core.files.uploadhandler.FileUploadHandler.chunk_size

FileUploadHandler.chunk_size Size, in bytes, of the “chunks” Django should store into memory and feed into the handler. That is, this attribute controls the size of chunks fed into FileUploadHandler.receive_data_chunk. For maximum performance the chunk sizes should be divisible by 4 and should not exceed 2 GB (231 bytes) in size. When there are multiple chunk sizes provided by multiple handlers, Django will use the smallest chunk size defined by any handler. The default is 64*210 bytes, or 6

forms.SelectDateWidget

class SelectDateWidget [source] Wrapper around three Select widgets: one each for month, day, and year. Takes several optional arguments: years An optional list/tuple of years to use in the “year” select box. The default is a list containing the current year and the next 9 years. months An optional dict of months to use in the “months” select box. The keys of the dict correspond to the month number (1-indexed) and the values are the displayed months: MONTHS = { 1:_('jan'), 2:_('

gis.geos.PreparedGeometry

class PreparedGeometry All methods on PreparedGeometry take an other argument, which must be a GEOSGeometry instance. contains(other) contains_properly(other) covers(other) crosses(other) disjoint(other) intersects(other) overlaps(other) touches(other) within(other)

db.models.query.QuerySet.in_bulk()

in_bulk(id_list=None) Takes a list of primary-key values and returns a dictionary mapping each primary-key value to an instance of the object with the given ID. If a list isn’t provided, all objects in the queryset are returned. Example: >>> Blog.objects.in_bulk([1]) {1: <Blog: Beatles Blog>} >>> Blog.objects.in_bulk([1, 2]) {1: <Blog: Beatles Blog>, 2: <Blog: Cheddar Talk>} >>> Blog.objects.in_bulk([]) {} >>> Blog.objects.in_bulk() {1: &

http.HttpRequest.is_secure()

HttpRequest.is_secure() [source] Returns True if the request is secure; that is, if it was made with HTTPS.

db.models.query.QuerySet.reverse()

reverse() Use the reverse() method to reverse the order in which a queryset’s elements are returned. Calling reverse() a second time restores the ordering back to the normal direction. To retrieve the “last” five items in a queryset, you could do this: my_queryset.reverse()[:5] Note that this is not quite the same as slicing from the end of a sequence in Python. The above example will return the last item first, then the penultimate item and so on. If we had a Python sequence and looked at

views.generic.dates.DayMixin

class DayMixin [source] A mixin that can be used to retrieve and provide parsing information for a day component of a date. Methods and Attributes day_format The strftime() format to use when parsing the day. By default, this is '%d'. day Optional The value for the day, as a string. By default, set to None, which means the day will be determined using other means. get_day_format() [source] Returns the strftime() format to use when parsing the day. Returns day_format by default

db.backends.base.schema.BaseDatabaseSchemaEditor.remove_field()

BaseDatabaseSchemaEditor.remove_field(model, field) [source] Removes the column(s) representing the field from the model’s table, along with any unique constraints, foreign key constraints, or indexes caused by that field. If the field is a ManyToManyField without a value for through, it will remove the table created to track the relationship. If through is provided, it is a no-op.