From 1697f4e49f782f6d793911ba7d24da6e0dac485e Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Tue, 12 Aug 2008 14:15:38 +0000 Subject: 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 --- tests/modeltests/get_object_or_404/models.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/modeltests/get_object_or_404') 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 -- cgit v1.3