[Answer]-Django Reddit Style Voting – URL keyword argument error

1πŸ‘

βœ…

I went through the pains of that outdated documentation myself. Here is how I got it to work:

How do you join two tables using Django without using raw sql?

Also, you may want to add this to the voting/urls.py

 url(r'^links/(?P<object_id>\d+)/(?P<direction>up|down|clear)vote/?$',                                                                                                                
     vote_on_object,                                                                                                                     
     dict(                                                                                                                               
         model=Movie,                                                                                                                     
         template_object_name='link',                                                                                                    
         template_name='movie/link_confirm_vote.html',                                                                                    
         allow_xmlhttprequest=True,                                                                                                      
         ),                                                                                                                              
     name="link_vote",)                                                                                                                  
πŸ‘€user1462141

Leave a comment