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

Fixed #7602 -- Corrected lookup keyword arguments in archive_month and archive_week to properly range when date_field is from DateField. Thanks nullie for the original patch and Colin Grady for the test coverage.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Brian Rosner
2008-08-23 04:46:33 +00:00
parent 264771f1b6
commit a64dc39fb7
5 changed files with 101 additions and 61 deletions

View File

@@ -21,7 +21,6 @@ class BaseArticle(models.Model):
title = models.CharField(max_length=100)
slug = models.SlugField()
author = models.ForeignKey(Author)
date_created = models.DateTimeField()
class Meta:
abstract = True
@@ -30,11 +29,20 @@ class BaseArticle(models.Model):
return self.title
class Article(BaseArticle):
pass
date_created = models.DateTimeField()
class UrlArticle(BaseArticle):
"""
An Article class with a get_absolute_url defined.
"""
date_created = models.DateTimeField()
def get_absolute_url(self):
return '/urlarticles/%s/' % self.slug
class DateArticle(BaseArticle):
"""
An article Model with a DateField instead of DateTimeField,
for testing #7602
"""
date_created = models.DateField()