diff --git a/Pipfile b/Pipfile index 14409c7..0559c57 100644 --- a/Pipfile +++ b/Pipfile @@ -10,6 +10,7 @@ pylint = "*" django = "*" django-thumbs-v2 = "*" image = "*" +django-widget-tweaks = "*" # Commented out to not explicitly specify Python3 subversion. # [requires] # python_version = "3.8" diff --git a/lostplaces/lostplaces_app/templates/partials/form/inputField.html b/lostplaces/lostplaces_app/templates/partials/form/inputField.html new file mode 100644 index 0000000..4206f51 --- /dev/null +++ b/lostplaces/lostplaces_app/templates/partials/form/inputField.html @@ -0,0 +1,16 @@ +{% load widget_tweaks %} + +
+ + {% render_field field class="LP-Input__Field"%} + + + {% if field.errors %} + {% for error in field.errors%} + {{error}} + {% endfor %} + {% elif field.help_text%} + {{ field.help_text }} + {% endif %} + +
\ No newline at end of file diff --git a/lostplaces/templates/signup.html b/lostplaces/templates/signup.html index 47e2598..abfce8d 100644 --- a/lostplaces/templates/signup.html +++ b/lostplaces/templates/signup.html @@ -1,15 +1,40 @@ {% extends 'global.html'%} {% load static %} +{% load widget_tweaks %} # {% block title %}Registrierung{% endblock %} {% block maincontent %} -

Registrierung

-
- {% csrf_token %} - {{ form.as_p }} - + +
+ Registrierung + {% csrf_token %} +
+
+ {% include 'partials/form/inputField.html' with field=form.username %} +
+
+ {% include 'partials/form/inputField.html' with field=form.email %} +
+
+ +
+
+ {% include 'partials/form/inputField.html' with field=form.password1 %} +
+
+
+
+ {% include 'partials/form/inputField.html' with field=form.password2 %} +
+
+ +
+ +
+
+
{% endblock maincontent %} \ No newline at end of file