views.decorators.debug.sensitive_variables()

sensitive_variables(*variables) [source] If a function (either a view or any regular callback) in your code uses local variables susceptible to contain sensitive information, you may prevent the values of those variables from being included in error reports using the sensitive_variables decorator: from django.views.decorators.debug import sensitive_variables @sensitive_variables('user', 'pw', 'cc') def process_info(user): pw = user.pass_word cc = user.credit_card_number name = u

core.files.storage.Storage.get_available_name()

get_available_name(name, max_length=None) [source] Returns a filename based on the name parameter that’s free and available for new content to be written to on the target storage system. The length of the filename will not exceed max_length, if provided. If a free unique filename cannot be found, a SuspiciousFileOperation exception will be raised. If a file with name already exists, an underscore plus a random 7 character alphanumeric string is appended to the filename before the extension.

utils.translation.ngettext_lazy()

ngettext_lazy(singular, plural, number) [source]

core.management.BaseCommand.missing_args_message

BaseCommand.missing_args_message If your command defines mandatory positional arguments, you can customize the message error returned in the case of missing arguments. The default is output by argparse (“too few arguments”).

core.files.storage.Storage.get_modified_time()

get_modified_time(name) [source] New in Django 1.10. Returns a datetime of the last modified time of the file. For storage systems unable to return the last modified time this will raise NotImplementedError. If USE_TZ is True, returns an aware datetime, otherwise returns a naive datetime in the local timezone.

template.response.TemplateResponse

class TemplateResponse [source] TemplateResponse is a subclass of SimpleTemplateResponse that knows about the current HttpRequest.

auth.forms.SetPasswordForm

class SetPasswordForm A form that lets a user change their password without entering the old password.

staticfiles.storage.StaticFilesStorage.post_process()

storage.StaticFilesStorage.post_process(paths, **options) This method is called by the collectstatic management command after each run and gets passed the local storages and paths of found files as a dictionary, as well as the command line options. The CachedStaticFilesStorage uses this behind the scenes to replace the paths with their hashed counterparts and update the cache appropriately.

http.HttpRequest.get_port()

HttpRequest.get_port() [source] New in Django 1.9. Returns the originating port of the request using information from the HTTP_X_FORWARDED_PORT (if USE_X_FORWARDED_PORT is enabled) and SERVER_PORT META variables, in that order.

test.utils.teardown_test_environment()

teardown_test_environment() [source] Performs global post-test teardown, such as removing instrumentation from the template system and restoring normal email services.