Fixed #19082 -- Enabled admin field pre-population for existing objects.

Thanks to msaelices and d1ffuz0r for the initial patch and tests.
This commit is contained in:
Julien Phalip 2013-07-30 00:21:08 -07:00
parent 6ed579e7eb
commit e351dbf6ee
5 changed files with 71 additions and 22 deletions

View file

@ -644,8 +644,8 @@ class MainPrepopulated(models.Model):
max_length=20,
choices=(('option one', 'Option One'),
('option two', 'Option Two')))
slug1 = models.SlugField()
slug2 = models.SlugField()
slug1 = models.SlugField(blank=True)
slug2 = models.SlugField(blank=True)
class RelatedPrepopulated(models.Model):
parent = models.ForeignKey(MainPrepopulated)