views.decorators.http.require_GET()

require_GET() Decorator to require that a view only accepts the GET method.

forms.BoundField.data

BoundField.data This property returns the data for this BoundField extracted by the widget’s value_from_datadict() method, or None if it wasn’t given: >>> unbound_form = ContactForm() >>> print(unbound_form['subject'].data) None >>> bound_form = ContactForm(data={'subject': 'My Subject'}) >>> print(bound_form['subject'].data) My Subject

utils.encoding.force_unicode()

force_unicode(s, encoding='utf-8', strings_only=False, errors='strict') Historical name of force_text(). Only available under Python 2.

http.FileResponse

class FileResponse [source] FileResponse is a subclass of StreamingHttpResponse optimized for binary files. It uses wsgi.file_wrapper if provided by the wsgi server, otherwise it streams the file out in small chunks. FileResponse expects a file open in binary mode like so: >>> from django.http import FileResponse >>> response = FileResponse(open('myfile.png', 'rb'))

views.generic.base.TemplateResponseMixin.render_to_response()

render_to_response(context, **response_kwargs) Returns a self.response_class instance. If any keyword arguments are provided, they will be passed to the constructor of the response class. Calls get_template_names() to obtain the list of template names that will be searched looking for an existent template.

forms.RegexField.regex

regex A regular expression specified either as a string or a compiled regular expression object. Also takes max_length, min_length, and strip, which work just as they do for CharField.

utils.encoding.iri_to_uri()

iri_to_uri(iri) [source] Convert an Internationalized Resource Identifier (IRI) portion to a URI portion that is suitable for inclusion in a URL. This is the algorithm from section 3.1 of RFC 3987#section-3.1. However, since we are assuming input is either UTF-8 or unicode already, we can simplify things a little from the full method. Takes an IRI in UTF-8 bytes and returns ASCII bytes containing the encoded result.

views.generic.dates.BaseDateListView.get_date_list_period()

get_date_list_period() [source] Returns the aggregation period for date_list. Returns date_list_period by default.

gis.widgets.BaseGeometryWidget.map_height

BaseGeometryWidget.map_height

middleware.locale.LocaleMiddleware.response_redirect_class

LocaleMiddleware.response_redirect_class Defaults to HttpResponseRedirect. Subclass LocaleMiddleware and override the attribute to customize the redirects issued by the middleware.