Re: Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
Sorted. I got owned by regex :-/ In urls.py, it should be: url(r'^watch/(?P[\w{}.-]{1,40})/$', 'find_music.views.watch', name='watch'), (see http://stackoverflow.com/questions/15951948/django-url-for-40-characters-alphanumeric ) Thanks. On Sat, Aug 10, 2013 at 10:36 PM, Sithembewena Lloyd Dub

Re: Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
P.S: The view looks like the following: def watch(request, video_id): return HttpResponse("This is the watch page for %s") % video_id On Sat, Aug 10, 2013 at 10:31 PM, Sithembewena Lloyd Dube wrote: > Hi, > > I am using the YouTube API to fetch video data and display it on a web > page. As par

Re: Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
P.S: The view looks like the following: def watch(request, video_id): return HttpResponse("This is the watch page for ...") % video_id On Sat, Aug 10, 2013 at 10:31 PM, Sithembewena Lloyd Dube wrote: > Hi, > > I am using the YouTube API to fetch video data and display it on a web > page. As pa

Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
Hi, 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: The url definition in urls.py is as follows: url(r'^(?P\w+)$', 'find_music.views.watch', name='watch'), W