Fixed #6365 -- Added `blank=True` to parent attribute of `m2o_recursive` model example, thanks dgrant.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9d18adde00
commit
4ee22e480e
|
@ -14,7 +14,7 @@ from django.db import models
|
|||
|
||||
class Category(models.Model):
|
||||
name = models.CharField(max_length=20)
|
||||
parent = models.ForeignKey('self', null=True, related_name='child_set')
|
||||
parent = models.ForeignKey('self', blank=True, null=True, related_name='child_set')
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
|
Loading…
Reference in New Issue