views.decorators.csrf.csrf_protect()

csrf_protect(view) Decorator that provides the protection of CsrfViewMiddleware to a view. Usage: from django.views.decorators.csrf import csrf_protect from django.shortcuts import render @csrf_protect def my_view(request): c = {} # ... return render(request, "a_template.html", c) If you are using class-based views, you can refer to Decorating class-based views.

views.decorators.csrf.ensure_csrf_cookie()

ensure_csrf_cookie(view) This decorator forces a view to send the CSRF cookie.

views.debug.SafeExceptionReporterFilter.get_traceback_frame_variables()

SafeExceptionReporterFilter.get_traceback_frame_variables(request, tb_frame) [source] Returns the filtered dictionary of local variables for the given traceback frame. By default it replaces the values of sensitive variables with stars (**********). See also You can also set up custom error reporting by writing a custom piece of exception middleware. If you do write custom error handling, it’s a good idea to emulate Django’s built-in error handling and only report/log errors if DEBUG is Fal

views.debug.SafeExceptionReporterFilter.get_post_parameters()

SafeExceptionReporterFilter.get_post_parameters(request) [source] Returns the filtered dictionary of POST parameters. By default it replaces the values of sensitive parameters with stars (**********).

views.decorators.cache.cache_control()

cache_control(**kwargs) [source] This decorator patches the response’s Cache-Control header by adding all of the keyword arguments to it. See patch_cache_control() for the details of the transformation.

views.debug.SafeExceptionReporterFilter.is_active()

SafeExceptionReporterFilter.is_active(request) [source] Returns True to activate the filtering operated in the other methods. By default the filter is active if DEBUG is False.

views.debug.SafeExceptionReporterFilter

class SafeExceptionReporterFilter [source]

utils.translation.ugettext_noop()

ugettext_noop(message) Marks strings for translation but doesn’t translate them now. This can be used to store strings in global variables that should stay in the base language (because they might be used externally) and will be translated later.

utils.translation.ugettext()

ugettext(message) [source] Translates message and returns it in a unicode string

utils.translation.ungettext()

ungettext(singular, plural, number) [source] Translates singular and plural and returns the appropriate string based on number in a unicode string.