So here's the deal. I have Menus and MenuItems:
class Menu(models.Model):
name = models.CharField(maxlength=200)
class MenuItem(models.Model):
menu_id = models.ForeignKey(Menu, blank=False, null=False,
edit_inline=models.TABULAR, num_in_admin=3)
parent = models.ForeignKey('self', null=True, blank=True,
related_name='child')
name = models.CharField(maxlength=200, core=True)
url = models.CharField(maxlength=255, core=True)
target = models.CharField(maxlength=200, blank=True,
choices=TARGET_CHOICES)
tagID = models.CharField(maxlength=200, blank=True, null=True)
sequence = models.IntegerField(choices=SEQUENCE_CHOICES)
My problem is that there exist over 1,000 records for MenuItem and the
dropdown list in the Admin has become unwieldy. In the parent dropdown
I would just like to show the MenuItems associated with the menu I'm
currently editing. I can't use raw_id_admin because of the edit_inline
and limit_choices_to hasn't worked because the ID I need to compare it
to comes from the url which the model doesn't have access to. If anyone
can point me in the right direction I'd appreciate it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---