How to get keword argument from url in django class based views? -
Is there a way to get keyword arguments declared in url.py within class based consideration methods?
For example: I want to override the You can do this: How it is done get_initial (self) to set one of the values from the url. I really want to do it
__ init __ to override?
arg_value = self .kwargs.get (ARGUMENT_NAME, none)
SingleObjectMixin , which provides the get_object functionality used in
DetailView Does.
Comments
Post a Comment