I have a Class called "Model" that has a field called "model_numbers". I have another class called "Category" that has a field called "category". In the Model Class, I have a field called category that is a Foreign Key to the field category in the Class category.
Also, here is the html that prints the modeul_number and category fields:
CATEGORY 1:
- Field 1
- Field 2
- Field 3
CATEGORY 2:
- Field 1
- Field 2
- Field 3
What I want it to print is:
CATEGORY 1:
- Field 1
- Field 2
CATEGORY 2:
- Field 3
In this way it prints out all the model numbers under their respective category name (instead of all model numbers under every category, which is not correct as each model number only has one category).
I posted about this on stackoverflow, and received a response but I am still confused.
Thank you!
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/098cc4aa-374a-4e9a-9da1-ee49bab591aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


No comments:
Post a Comment