Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed docstring additions from [5744] to use active verbs ('returns…

…' instead of 'return')

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit da6b3865ae096dadedc4827bbc316fe76e519802 1 parent 3b78695
@adrianholovaty adrianholovaty authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 django/shortcuts/__init__.py
View
12 django/shortcuts/__init__.py
@@ -11,7 +11,7 @@
def render_to_response(*args, **kwargs):
"""
- Return a HttpResponse whose content is filled with the result of calling
+ Returns a HttpResponse whose content is filled with the result of calling
django.template.loader.render_to_string() with the passed arguments.
"""
return HttpResponse(loader.render_to_string(*args, **kwargs))
@@ -19,7 +19,7 @@ def render_to_response(*args, **kwargs):
def _get_queryset(klass):
"""
- Return a QuerySet from a Model, Manager, or QuerySet. Created to make
+ Returns a QuerySet from a Model, Manager, or QuerySet. Created to make
get_object_or_404 and get_list_or_404 more DRY.
"""
if isinstance(klass, QuerySet):
@@ -32,10 +32,10 @@ def _get_queryset(klass):
def get_object_or_404(klass, *args, **kwargs):
"""
- Use get() to return an object, or raise a Http404 exception if the object
+ Uses get() to return an object, or raises a Http404 exception if the object
does not exist.
- klass may be a Model, Manager, or QuerySet object. All other passed
+ klass may be a Model, Manager, or QuerySet object. All other passed
arguments and keyword arguments are used in the get() query.
Note: Like with get(), an AssertionError will be raised if more than one
@@ -49,10 +49,10 @@ def get_object_or_404(klass, *args, **kwargs):
def get_list_or_404(klass, *args, **kwargs):
"""
- Use filter() to return a list of objects, or raise a Http404 exception if
+ Uses 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
+ klass may be a Model, Manager, or QuerySet object. All other passed
arguments and keyword arguments are used in the filter() query.
"""
queryset = _get_queryset(klass)
Please sign in to comment.
Something went wrong with that request. Please try again.