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:


#views.py
class Update_resp(UpdateView):
    model=Response
    template_name="attend_edit.html"
    object=get_object()    # <---  this is unclear to me in the
docs... what do I do here???

#urls.py
urlpatterns = patterns('',
(r'^attend/response/edit/(?P<pk>\d+)', UpdateView.as_view()))


1)  What do I do to get <pk> from the URL responder into the class-
based view, to tell the view what object I want to edit?
2)  Why do I get a "name 'get_object' is not defined" error when I run
this code?

Thanks!!

Nick

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to