Changeset 8325 for django/trunk/tests/modeltests/get_object_or_404
- Timestamp:
- 08/12/08 09:15:38 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/modeltests/get_object_or_404/models.py
r6838 r8325 2 2 35. DB-API Shortcuts 3 3 4 get_object_or_404is a shortcut function to be used in view functions for5 performing a get() lookup and raising a Http404 exception if a DoesNotExist6 exception was raised during the get()call.4 ``get_object_or_404()`` is a shortcut function to be used in view functions for 5 performing a ``get()`` lookup and raising a ``Http404`` exception if a 6 ``DoesNotExist`` exception was raised during the ``get()`` call. 7 7 8 get_list_or_404is a shortcut function to be used in view functions for9 performing a filter() lookup and raising a Http404 exception if a DoesNotExist10 exception was raised during the filter()call.8 ``get_list_or_404()`` is a shortcut function to be used in view functions for 9 performing a ``filter()`` lookup and raising a ``Http404`` exception if a 10 ``DoesNotExist`` exception was raised during the ``filter()`` call. 11 11 """ 12 12 … … 17 17 class Author(models.Model): 18 18 name = models.CharField(max_length=50) 19 19 20 20 def __unicode__(self): 21 21 return self.name … … 30 30 objects = models.Manager() 31 31 by_a_sir = ArticleManager() 32 32 33 33 def __unicode__(self): 34 34 return self.title
