Skip to content

Instantly share code, notes, and snippets.

Created Oct 24, 2013
What would you like to do?
class MyView(UpdateView):
template_name = 'user.html'
form_class = UserForm
success_url = reverse_lazy('success')
def get_form_kwargs(self):
kwargs = super(MyView, self).get_form_kwargs()
kwargs['instance'] = self.request.user
return kwargs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment