From 27391049f27d6656b112c264c011d06f5571eeb2 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Fri, 28 Feb 2020 16:12:35 +0100 Subject: [PATCH] remove duplicated form --- apps/member/views.py | 4 ++-- templates/member/user_alias.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/member/views.py b/apps/member/views.py index 14ba0556..ce3beb39 100644 --- a/apps/member/views.py +++ b/apps/member/views.py @@ -164,8 +164,8 @@ class AliasView(LoginRequiredMixin,FormMixin,DetailView): def get_context_data(self,**kwargs): context = super().get_context_data(**kwargs) - context["aliases"] = AliasTable(context['user_object'].note.alias_set.all()) - context["alias_form"] = AliasForm() + note = context['user_object'].note + context["aliases"] = AliasTable(note.alias_set.all()) return context def get_success_url(self): diff --git a/templates/member/user_alias.html b/templates/member/user_alias.html index f1a06e7e..4c6834d4 100644 --- a/templates/member/user_alias.html +++ b/templates/member/user_alias.html @@ -47,9 +47,9 @@
-
+ {% csrf_token %} - {{ alias_form |crispy }} + {{ form |crispy }}