Alright, I'm pretty new to Django and I've got this problem I can't
quite solve.
I basically have two models, wich I use to put blog articles into
categories. One is a Category and the other is a Subject. So in my
categories I might have ('Programming', 'Music', 'Essays') and my
subjects are listed under those various categories. So under
Programming I might have ('Python', 'PHP', 'ASM').
Here a stripped down version of my models :
class Category(models.Model):
name = models.CharField(_('Categorie'), max_length=100)
class Subject(models.Model):
name = models.CharField(_('Forum'), max_length=100)
description = models.CharField(_('Description'), max_length=250)
category = models.ForeignKey(Category)
Now, what I try to do in my view, is to loop through the categories
and list each subject it contains. Someone can help me ?
--
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?hl=.