1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-27 02:43:01 +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): def get_context_data(self,**kwargs):
context = super().get_context_data(**kwargs) context = super().get_context_data(**kwargs)
context["aliases"] = AliasTable(context['user_object'].note.alias_set.all()) note = context['user_object'].note
context["alias_form"] = AliasForm() context["aliases"] = AliasTable(note.alias_set.all())
return context return context
def get_success_url(self): def get_success_url(self):

View File

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