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

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -