By default, all fields are obligatory. You have to set categories = models.ManyToManyField('self', blank=True) to escape from that problem.
Good luck! Aidas Bendoraitis [aka Archatas] On 10/18/06, Lutz Steinborn <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm trying to figure out how a ManyToMany Relation work. > > My Example: > > class Category(models.Model): > class Admin: > pass > > class Meta: > ordering = ('sort', 'name') > > name = models.CharField(maxlength=250, default='') > description = models.TextField(default='') > created_at = models.DateTimeField(auto_now_add=True) > modified_at = models.DateTimeField(auto_now=True) > > categories = models.ManyToManyField('self') > > > The problem ist then I'm trying to create the first category > over the Admin interface, the interface tells me that > categories is required. > > So I can't create the first set to drop the error becaus I need > the first set to create them. > > Can any one give me a hint whats wrong ? > > Kindly regards > > Lutz > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---