diff options
| author | Anton Samarchyan <anton.samarchyan@savoirfairelinux.com> | 2017-01-24 15:37:33 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-03-04 10:02:06 -0500 |
| commit | 86de930f413e0ad902e11d78ac988e6743202ea6 (patch) | |
| tree | 790dcc4c38125b619ffee76b5531155d0d8232f4 /django/shortcuts.py | |
| parent | 6ae1b04fb584db0fdb22b8e287784c4ed3ac62ac (diff) | |
Refs #27656 -- Updated remaining docstring verbs according to PEP 257.
Diffstat (limited to 'django/shortcuts.py')
| -rw-r--r-- | django/shortcuts.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/django/shortcuts.py b/django/shortcuts.py index c489ecd5cd..0ce7ee327f 100644 --- a/django/shortcuts.py +++ b/django/shortcuts.py @@ -17,7 +17,7 @@ from django.utils.functional import Promise def render_to_response(template_name, context=None, content_type=None, status=None, using=None): """ - Returns a HttpResponse whose content is filled with the result of calling + Return a HttpResponse whose content is filled with the result of calling django.template.loader.render_to_string() with the passed arguments. """ warnings.warn( @@ -31,7 +31,7 @@ def render_to_response(template_name, context=None, content_type=None, status=No def render(request, template_name, context=None, content_type=None, status=None, using=None): """ - Returns a HttpResponse whose content is filled with the result of calling + Return a HttpResponse whose content is filled with the result of calling django.template.loader.render_to_string() with the passed arguments. """ content = loader.render_to_string(template_name, context, request, using=using) @@ -40,7 +40,7 @@ def render(request, template_name, context=None, content_type=None, status=None, def redirect(to, *args, permanent=False, **kwargs): """ - Returns an HttpResponseRedirect to the appropriate URL for the arguments + Return an HttpResponseRedirect to the appropriate URL for the arguments passed. The arguments could be: @@ -74,7 +74,7 @@ def _get_queryset(klass): def get_object_or_404(klass, *args, **kwargs): """ - Uses get() to return an object, or raises a Http404 exception if the object + Use get() to return an object, or raise a Http404 exception if the object does not exist. klass may be a Model, Manager, or QuerySet object. All other passed @@ -98,7 +98,7 @@ def get_object_or_404(klass, *args, **kwargs): def get_list_or_404(klass, *args, **kwargs): """ - Uses filter() to return a list of objects, or raise a Http404 exception if + Use filter() to return a list of objects, or raise a Http404 exception if the list is empty. klass may be a Model, Manager, or QuerySet object. All other passed |
