Adding YouTube video id to url
Hi,
--
Regards,
Sithu Lloyd Dube
-- I am using the YouTube API to fetch video data and display it on a web page. As part of the html template I have an anchor tag with an href directing to my Django 1.5 app. as follows:
<a href="{% url 'find_music:watch' video_id=video.video_id %}">
The url definition in urls.py is as follows:
url(r'^(?P<video_id>\w+)$', 'find_music.views.watch', name='watch'),
When I load the page, I get a NoReverseMatch exception as follows:
Reverse for 'watch' with arguments '()' and keyword arguments '{u'video_id': 'D-dNA0NwLSw'}' not found.
What could I be missing?
Thanks.
Regards,
Sithu Lloyd Dube
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home