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>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Login</button>
{{ voucher_form.as_p }}
<button type="submit">Überprüfen</button>
</form>
{% endblock maincontent %}

View File

@ -21,7 +21,8 @@ class VoucherVerify(View):
fields = ['code']
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):
form_class = ExplorerCreationForm