feat: Add crispy forms
This commit is contained in:
parent
6210b47684
commit
6d1cf9084b
@ -366,4 +366,12 @@ h1 {
|
|||||||
.tags {
|
.tags {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group {
|
||||||
|
margin: 30px;
|
||||||
}
|
}
|
@ -1,15 +1,19 @@
|
|||||||
{% extends "fellchensammlung/base_generic.html" %}
|
{% extends "fellchensammlung/base_generic.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load crispy_forms_tags %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% translate "Vermitteln" %}</h1>
|
<h1>{% translate "Vermitteln" %}</h1>
|
||||||
{% blocktranslate %}
|
<p>
|
||||||
Bitte mach dich zunächst mit unseren Regeln vertraut. Dann trage hier die ersten Informationen ein.
|
{% blocktranslate %}
|
||||||
Du bekommst in einem weiteren Schritt die Möglichkeit einzelne Tiere zu deiner Vermittlung hinzuzufügen und Fotos hochzuladen.
|
Bitte mach dich zunächst mit unseren Regeln vertraut. Dann trage hier die ersten Informationen ein.
|
||||||
{% endblocktranslate %}
|
Du bekommst in einem weiteren Schritt die Möglichkeit einzelne Tiere zu deiner Vermittlung hinzuzufügen und
|
||||||
<form method = "post" enctype="multipart/form-data">
|
Fotos hochzuladen.
|
||||||
|
</p>
|
||||||
|
{% endblocktranslate %}
|
||||||
|
<form method="post" class="card" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form | crispy}}
|
||||||
<button type="submit">{% translate "Weiter" %}</button>
|
<button type="submit">{% translate "Weiter" %}</button>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -144,6 +144,8 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'fontawesomefree',
|
'fontawesomefree',
|
||||||
|
'crispy_forms',
|
||||||
|
"crispy_bootstrap4",
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@ -240,6 +242,9 @@ LANGUAGES = (
|
|||||||
('de', _('German')),
|
('de', _('German')),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4"
|
||||||
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user