Hi,
I'm writing a video site on app engine where the user can tag videos
as favorites.
What I've done is store the keys of a users favorite videos in a dict,
and I try to determine if I should be allowing them to add or remove
this video from their favorites like this (truncated):
{% for video in video_list %}
{% if favorites[video.key] %}
... offer to remove
{% endif %}
{% endfor %}
... but this of course blows up because the template system can't
understand favorites[video.key]. I wonder how I should organize this
data and write the tags so that it works... should I be adding a
property to each video to mark it as a favorite? I've tried this:
for video in videos:
video.favorite = True
but that property (or attribute or whatever it's called) doesn't show
up in my template as true ... ??
Many Thanks,
James
--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---