rename second_form to profile_form
This commit is contained in:
parent
211859e940
commit
f992c117f4
1 changed files with 2 additions and 4 deletions
|
|
@ -58,14 +58,12 @@ class UserUpdateView(LoginRequiredMixin, UpdateView):
|
||||||
fields = ['first_name', 'last_name', 'username', 'email']
|
fields = ['first_name', 'last_name', 'username', 'email']
|
||||||
template_name = 'member/profile_update.html'
|
template_name = 'member/profile_update.html'
|
||||||
context_object_name = 'user_object'
|
context_object_name = 'user_object'
|
||||||
second_form = ProfileForm
|
profile_form = ProfileForm
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context["profile_form"] = self.second_form(
|
context['profile_form'] = self.profile_form(instance=context['user_object'].profile)
|
||||||
instance=context['user_object'].profile)
|
|
||||||
context['title'] = _("Update Profile")
|
context['title'] = _("Update Profile")
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def get_form(self, form_class=None):
|
def get_form(self, form_class=None):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue