diff --git a/fet2020/authentications/forms.py b/fet2020/authentications/forms.py new file mode 100644 index 00000000..204803e6 --- /dev/null +++ b/fet2020/authentications/forms.py @@ -0,0 +1,6 @@ +from django import forms + + +class LoginForm(forms.Form): + username = forms.CharField() + password = forms.CharField(label='Passwort', widget=forms.PasswordInput()) diff --git a/fet2020/authentications/views.py b/fet2020/authentications/views.py index 0d9981b2..bbf8b0a3 100644 --- a/fet2020/authentications/views.py +++ b/fet2020/authentications/views.py @@ -3,9 +3,11 @@ from django.contrib.auth import login, logout from django.contrib import messages from django.contrib.auth.models import User +from documents.etherpadlib import del_ep_cookie + from .authentications import authentication from .decorators import unauthenticated_user, authenticated_user -from documents.etherpadlib import del_ep_cookie +from .forms import LoginForm @unauthenticated_user @@ -27,7 +29,11 @@ def loginPage(request): else: messages.info(request, 'username or password is incorrect') - context = {} + form = LoginForm() + + context = { + "form": form, + } return render(request, 'authentications/login.html', context) diff --git a/fet2020/templates/authentications/login.html b/fet2020/templates/authentications/login.html index 85620a87..20fc8a90 100644 --- a/fet2020/templates/authentications/login.html +++ b/fet2020/templates/authentications/login.html @@ -1,123 +1,23 @@ - - - -
-{{message}}
- {% endfor %} - -