forms.Widget.attrs

attrs A dictionary containing HTML attributes to be set on the rendered widget. >>> from django import forms >>> name = forms.TextInput(attrs={'size': 10, 'title': 'Your name',}) >>> name.render('name', 'A name') '<input title="Your name" type="text" name="name" value="A name" size="10" required />' If you assign a value of True or False to an attribute, it will be rendered as an HTML5 boolean attribute: >>> name = forms.TextInput(attrs={'required':

gis.geoip2.GeoIP2.lon_lat()

GeoIP2.lon_lat(query) Returns a coordinate tuple of (longitude, latitude).

views.generic.list.MultipleObjectMixin.model

model The model that this view will display data for. Specifying model = Foo is effectively the same as specifying queryset = Foo.objects.all(), where objects stands for Foo’s default manager.

core.files.uploadedfile.UploadedFile.multiple_chunks()

UploadedFile.multiple_chunks(chunk_size=None) Returns True if the uploaded file is big enough to require reading in multiple chunks. By default this will be any file larger than 2.5 megabytes, but that’s configurable; see below.

core.files.File.mode

mode The read/write mode for the file.

auth.password_validation.MinimumLengthValidator

class MinimumLengthValidator(min_length=8) [source] Validates whether the password meets a minimum length. The minimum length can be customized with the min_length parameter.

utils.log.RequireDebugFalse

class RequireDebugFalse [source] This filter will only pass on records when settings.DEBUG is False. This filter is used as follows in the default LOGGING configuration to ensure that the AdminEmailHandler only sends error emails to admins when DEBUG is False: 'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse', } }, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.ut

db.models.query.QuerySet.get()

get(**kwargs) Returns the object matching the given lookup parameters, which should be in the format described in Field lookups. get() raises MultipleObjectsReturned if more than one object was found. The MultipleObjectsReturned exception is an attribute of the model class. get() raises a DoesNotExist exception if an object wasn’t found for the given parameters. This exception is an attribute of the model class. Example: Entry.objects.get(id='foo') # raises Entry.DoesNotExist The DoesNotExi

views.generic.edit.FormMixin.initial

initial A dictionary containing initial data for the form.

test.Client.delete()

delete(path, data='', content_type='application/octet-stream', follow=False, secure=False, **extra) [source] Makes a DELETE request on the provided path and returns a Response object. Useful for testing RESTful interfaces. When data is provided, it is used as the request body, and a Content-Type header is set to content_type. The follow, secure and extra arguments act the same as for Client.get().