Finally got an input form. :-)

This commit is contained in:
Marcus Scholz 2020-08-01 19:21:59 +02:00
parent 9bd85aba7a
commit cd0df727cc
2 changed files with 4 additions and 3 deletions

View File

@ -8,8 +8,8 @@
<h2>Voucher-Überprüfung</h2> <h2>Voucher-Überprüfung</h2>
<form method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ voucher_form.as_p }}
<button type="submit">Login</button> <button type="submit">Überprüfen</button>
</form> </form>
{% endblock maincontent %} {% endblock maincontent %}

View File

@ -21,7 +21,8 @@ class VoucherVerify(View):
fields = ['code'] fields = ['code']
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
return render(request, 'voucher-verify.html') voucher_form = VoucherVerifyForm()
return render(request, 'voucher-verify.html', {'voucher_form': voucher_form})
class SignUpView(CreateView): class SignUpView(CreateView):
form_class = ExplorerCreationForm form_class = ExplorerCreationForm