summaryrefslogtreecommitdiff
path: root/tests/modeltests/get_object_or_404
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2008-08-12 14:15:38 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2008-08-12 14:15:38 +0000
commit1697f4e49f782f6d793911ba7d24da6e0dac485e (patch)
tree11d0e2e898cdb1cde73f59deb24ef95a8169ef04 /tests/modeltests/get_object_or_404
parentc4d07d4d5026316c7ff46edd894e585e7406e1a9 (diff)
Fixed a couple typos in the modeltests' descriptions and made use of ReST inline literal markup for code snippets.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/get_object_or_404')
-rw-r--r--tests/modeltests/get_object_or_404/models.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/modeltests/get_object_or_404/models.py b/tests/modeltests/get_object_or_404/models.py
index d9f276b024..6e4da44481 100644
--- a/tests/modeltests/get_object_or_404/models.py
+++ b/tests/modeltests/get_object_or_404/models.py
@@ -1,13 +1,13 @@
"""
35. DB-API Shortcuts
-get_object_or_404 is a shortcut function to be used in view functions for
-performing a get() lookup and raising a Http404 exception if a DoesNotExist
-exception was raised during the get() call.
+``get_object_or_404()`` is a shortcut function to be used in view functions for
+performing a ``get()`` lookup and raising a ``Http404`` exception if a
+``DoesNotExist`` exception was raised during the ``get()`` call.
-get_list_or_404 is a shortcut function to be used in view functions for
-performing a filter() lookup and raising a Http404 exception if a DoesNotExist
-exception was raised during the filter() call.
+``get_list_or_404()`` is a shortcut function to be used in view functions for
+performing a ``filter()`` lookup and raising a ``Http404`` exception if a
+``DoesNotExist`` exception was raised during the ``filter()`` call.
"""
from django.db import models
@@ -16,7 +16,7 @@ from django.shortcuts import get_object_or_404, get_list_or_404
class Author(models.Model):
name = models.CharField(max_length=50)
-
+
def __unicode__(self):
return self.name
@@ -29,7 +29,7 @@ class Article(models.Model):
title = models.CharField(max_length=50)
objects = models.Manager()
by_a_sir = ArticleManager()
-
+
def __unicode__(self):
return self.title