Monday, November 1, 2010

django-voting url pattern

Hi all,

I have django-voting installed and am trying to get through the 'recipe'.  I have a url pattern which (I expect) should route voting actions to a view.

Problem is, which view or views should handle this? The URL pattern is as follows:

     (r'^videos/(?P<object_id>\d+)/(?P<direction>up|down|clear)vote/?$', vote_on_object, video_dict),

I can see that object_id is being trapped as a parameter, but what is the italicised/ bold section doing and what URL do I then get out of it? In other words, I cannot decide what the view/s to handle the URL should be.

Thanks,

--
Regards,
Sithembewena Lloyd Dube
http://www.lloyddube.com

--
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.

No comments:

Post a Comment