mirror of
https://github.com/django/django.git
synced 2025-11-20 03:30:00 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue