Hello Djangoers!

I have many Vocabularies and nested Categories in each of the
Vocabularies, described in the following way:

----
from django.db import models

class Vocabulary(models.Model):
    name = models.CharField(maxlength=20)

class Category(models.Model):
    vocabulary = models.ForeignKey(Vocabulary)
    name = models.CharField(maxlength=20)
    parent = models.ForeignKey('self', null=True, related_name='child_set')
----

Is it possible to limit choices of the parent categories according the
chosen vocabulary? If the category is saved (so the vocabulary_id is
known to the system), I'd like that the administrator would see only
the parent categories of the chosen vocabulary in the select list.

Regards,
Aidas Bendoraitis [aka Archatas]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to