Changeset 5756
- Timestamp:
- 07/24/07 22:12:31 (1 year ago)
- Files:
-
- django/trunk/django/shortcuts/__init__.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/shortcuts/__init__.py
r5747 r5756 12 12 def render_to_response(*args, **kwargs): 13 13 """ 14 Return a HttpResponse whose content is filled with the result of calling14 Returns a HttpResponse whose content is filled with the result of calling 15 15 django.template.loader.render_to_string() with the passed arguments. 16 16 """ … … 20 20 def _get_queryset(klass): 21 21 """ 22 Return a QuerySet from a Model, Manager, or QuerySet. Created to make22 Returns a QuerySet from a Model, Manager, or QuerySet. Created to make 23 23 get_object_or_404 and get_list_or_404 more DRY. 24 24 """ … … 33 33 def get_object_or_404(klass, *args, **kwargs): 34 34 """ 35 Use get() to return an object, or raisea Http404 exception if the object35 Uses get() to return an object, or raises a Http404 exception if the object 36 36 does not exist. 37 37 38 klass may be a Model, Manager, or QuerySet object. All other passed38 klass may be a Model, Manager, or QuerySet object. All other passed 39 39 arguments and keyword arguments are used in the get() query. 40 40 … … 50 50 def get_list_or_404(klass, *args, **kwargs): 51 51 """ 52 Use filter() to return a list of objects, or raise a Http404 exception if52 Uses filter() to return a list of objects, or raise a Http404 exception if 53 53 the list is empty. 54 54 55 klass may be a Model, Manager, or QuerySet object. All other passed55 klass may be a Model, Manager, or QuerySet object. All other passed 56 56 arguments and keyword arguments are used in the filter() query. 57 57 """
