mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #27475 -- Fixed NonExistentTimeError crash in ModelAdmin.date_hierarchy.
This commit is contained in:
parent
8346680e1c
commit
e88d2dfcf4
4 changed files with 36 additions and 17 deletions
|
@ -590,6 +590,7 @@ class WorkHour(models.Model):
|
|||
class Question(models.Model):
|
||||
question = models.CharField(max_length=20)
|
||||
posted = models.DateField(default=datetime.date.today)
|
||||
expires = models.DateTimeField(null=True, blank=True)
|
||||
|
||||
|
||||
class Answer(models.Model):
|
||||
|
@ -600,6 +601,11 @@ class Answer(models.Model):
|
|||
return self.answer
|
||||
|
||||
|
||||
class Answer2(Answer):
|
||||
class Meta:
|
||||
proxy = True
|
||||
|
||||
|
||||
class Reservation(models.Model):
|
||||
start_date = models.DateTimeField()
|
||||
price = models.IntegerField()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue