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 -

ios - Apple Push Notifications + TestFlight + Enterprise wildcard provisioning profile -

android - Drag and drop in ScrollView -