1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #5496 -- Added test cases for some of the built-in Django views. Thanks to Manuel Saelices <msaelices@yaco.es> for the original patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2007-09-17 14:48:33 +00:00
parent 2e75529990
commit 1571e9c32b
18 changed files with 240 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
"""
Regression tests for Django built-in views
"""
from django.db import models
from django.conf import settings
class Author(models.Model):
name = models.CharField(max_length=100)
def __unicode__(self):
return self.name
def get_absolute_url(self):
return '/views/authors/%s/' % self.id
class Article(models.Model):
title = models.CharField(max_length=100)
author = models.ForeignKey(Author)
def __unicode__(self):
return self.title