views.generic.dates.YearMixin.get_year_format()

get_year_format() [source] Returns the strftime() format to use when parsing the year. Returns year_format by default.

utils.safestring.SafeText

class SafeText [source] A str (in Python 3) or unicode (in Python 2) subclass that has been specifically marked as “safe” for HTML output purposes.

http.HttpRequest.__iter__()

HttpRequest.__iter__() Methods implementing a file-like interface for reading from an HttpRequest instance. This makes it possible to consume an incoming request in a streaming fashion. A common use-case would be to process a big XML payload with an iterative parser without constructing a whole XML tree in memory. Given this standard interface, an HttpRequest instance can be passed directly to an XML parser such as ElementTree: import xml.etree.ElementTree as ET for element in ET.iterparse(r

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().

gis.geoip2.GeoIP2.lon_lat()

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

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':

db.models.Func.arity

arity New in Django 1.10. A class attribute that denotes the number of arguments the function accepts. If this attribute is set and the function is called with a different number of expressions, TypeError will be raised. Defaults to None.

gis.geoip.GeoIP.country_code_by_addr()

GeoIP.country_code_by_addr(query)

gis.gdal.OGRGeometry.disjoint()

disjoint(other) Returns True if this geometry is spatially disjoint to (i.e. does not intersect) the other, otherwise returns False.

forms.ComboField.fields

fields The list of fields that should be used to validate the field’s value (in the order in which they are provided). >>> from django.forms import ComboField >>> f = ComboField(fields=[CharField(max_length=20), EmailField()]) >>> f.clean('test@example.com') 'test@example.com' >>> f.clean('longemailaddress@example.com') Traceback (most recent call last): ... ValidationError: ['Ensure this value has at most 20 characters (it has 28).']