To get keywords from your url, take a look at self.kwargs.
Remember you are working with a Class now, and keeping that in mind is
fundamental to not getting frustrated with the new CBVs.
get_object() is a method that can be overridden by subclasses. Browse
the source code for the CBVs to and try t
Django automatically calls get_object() to get the object that needs to be
updated by your form.
There is a default get_object() method in the SingleObjectMixin that just
gets the object based on the "model" and the "pk" that's passed in:
https://code.djangoproject.com/browser/django/trunk/djan
Help I am trying to use a generic view, UpdateView, to update a
form. The documentation on most of Django is great but for class-
based generic views it is sorely lacking in examples to illustrate the
changes from function views, and I am confused and frustrated.
A couple of my code snippets:
3 matches
Mail list logo