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
This commit is contained in:
Adrian Holovaty 2007-07-25 03:12:31 +00:00
parent 3b78695a64
commit da6b3865ae
1 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ from django.db.models.query import QuerySet
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 @@ load_and_render = render_to_response # For backwards compatibility.
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)