Groups
Groups
Sign in
Groups
Groups
Django users
Conversations
About
Send feedback
Help
displaying manytomany fields in template
16 views
Skip to first unread message
splucena
unread,
Jan 21, 2014, 1:34:00 AM
1/21/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Template:
{% for per in person_list%}
<tr>
<td>{{ per }}</td>
{% for spec in per.specialization_id.all %}
<td>{{ spec }}</td>
{% endfor %}
</tr>
{% endfor %}
Here's my code in the template. I'ts not doing what I intend to see.
The table looks like this:
FullName | Programming | Web Design
How can I make it look like this instead
FullName | Programming, Web Design |
Jonathan Pentecost
unread,
Jan 21, 2014, 3:27:57 PM
1/21/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
You will need to provide the Person model to decipher what is going on in your template.
Reply all
Reply to author
Forward
0 new messages