Hi, just getting to grips with django basics, and stumbling over this
little problem..
I have a list of categories, some of which are sub categories, the
model looks something like this:

name = models.CharField(max_length=30)
slug = models.SlugField(prepopulate_from=("name",))
parent = models.ForeignKey('self', blank=True, null=True)

Some items have parents, some do not (those that are parents, in
theory this should be able to support multiple levels of parents).
I'm trying to display a list, grouped correctly, i.e.
Item 1 (no parent)
- Item 2 (parent is item 1)
- Item 3 (parent is item 1)
- - Item 4 (parent is item 3)
Item 5 (no parent)
etc

I have tried using the regroup template tag to group by parent, but
the parent items are listed twice, both as an item under the None
group and then as their own group.

How should I be going about this?
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to