On Sat, 2008-12-13 at 15:17 -0800, XeroXer wrote:
[...]

> The problem I am having is how do I show this in a nice list with the
> child object following their parent.
> Like:
> <ul>
> <li>Parent
> <ul>
> <li>Child</li>
> </ul>
> </li>
> <li>Single</li>
> </ul>
> 
> Well something like that, maybe someone can help me ... :)

The unordered_list template filter is a good place to start
experimenting. If that doesn't quite do what you want, you'll have to
write a custom tag, but you can get a lot done with unordered_list if
you process your data into the right structure before passing it to the
template. Documentation here:

http://docs.djangoproject.com/en/dev/ref/templates/builtins/#unordered-list

As a general hint, as you're playing around, it's worth spending a while
looking through all the available template tags and filters on that page
and perhaps making a small toy example that uses each one. That way,
you'll know what is available and your brain will start thinking about
the possibilities.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to