Displaying link in template based on m2m data
I've got a list of events, each event has a list of people attending
through a m2m relationship.
I want to display a list of events, and display an "RSVP for this
event" link on each event, based on wether or not the request.user is
already attending.
How can I determine if the request.user is in the attending list as i
iterate through the events? Since the templating system doesn't
support complex logic, I'm not sure how I would do this.
- Patrick D
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home