Sure. You can pass the continents in your context. Then in the template you loop through the continents.

Within that loop, you loop through continent.country_set.all. However, it's good form to add a 'related_name' to your countries model to make it easier to access from a continent.

Also, your class names (continents and countries) should be singular and upper-cased (Continent and Country).


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