﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6365	"parent needs blank=True on ""Relating an object to itself, many-to-one"""	David Grant	nobody	"On [http://www.djangoproject.com/documentation/models/m2o_recursive/ this many-to-one self relation example] parent needs to have blank=True or else forms won't validate in admin when trying to create a root-level category.
{{{
from django.db import models

class Category(models.Model):
    name = models.CharField(max_length=20)
    parent = models.ForeignKey('self', null=True, blank=True, related_name='child_set')

    def __unicode__(self):
        return self.name
}}}"		closed	Documentation	dev		fixed			Unreviewed	0	0	0	0	0	0
