1
0
mirror of https://github.com/django/django.git synced 2025-10-27 07:36:08 +00:00

[1.10.x] Fixed #27186 -- Fixed model form default fallback for MultiWidget, FileInput, SplitDateTimeWidget, SelectDateWidget, and SplitArrayWidget.

Thanks Matt Westcott for the review.

Backport of 3507d4e773 from master
This commit is contained in:
Tim Graham
2016-09-06 17:41:54 -04:00
parent 190cd0e49f
commit 0b59ea3343
15 changed files with 178 additions and 13 deletions

View File

@@ -120,9 +120,11 @@ class PublicationDefaults(models.Model):
CATEGORY_CHOICES = ((1, 'Games'), (2, 'Comics'), (3, 'Novel'))
title = models.CharField(max_length=30)
date_published = models.DateField(default=datetime.date.today)
datetime_published = models.DateTimeField(default=datetime.datetime(2000, 1, 1))
mode = models.CharField(max_length=2, choices=MODE_CHOICES, default=default_mode)
category = models.IntegerField(choices=CATEGORY_CHOICES, default=default_category)
active = models.BooleanField(default=True)
file = models.FileField(default='default.txt')
class Author(models.Model):