Django: capturing values in url to generic class view -


so have url:

url(r'^mousesmall/(?p<name>.*)/$', idview.as_view()), 

and view is:

class idview(detailview):     model = rna     template_name = "home/details.html" 

since i'm using generic view detailview, how pass name value that's captured in url detail view?

the base view class detailview inherits sets args , kwargs self.args , self.kwargs respectively in processing. since it's named pattern, should in self.kwargs['name'].


Comments

Popular posts from this blog

node.js - StackOverflow API not returning JSON -

php - Laravel 4.1 to Heroku: SQLSTATE[HY000] [2002] No such file or directory -

visual studio - How to generate shader debug information (pdb) in VS2012 -