1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

remove duplicated form

This commit is contained in:
Pierre-antoine Comby 2020-02-28 16:12:35 +01:00
parent db95944574
commit 27391049f2
2 changed files with 4 additions and 4 deletions

View File

@ -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):

View File

@ -47,9 +47,9 @@
<div class="col-md-9">
<div class="d-flex justify-content-center">
<form method="post">
<form action="" method="post">
{% csrf_token %}
{{ alias_form |crispy }}
{{ form |crispy }}
<button class="btn btn-primary" type="submit">
{% trans "Add alias" %}
</button>