Skip to content

Commit

Permalink
Merge pull request #80 from ImperialCollegeLondon/crispy-forms
Browse files Browse the repository at this point in the history
Install crispy forms
  • Loading branch information
cc-a authored Sep 18, 2024
2 parents d41276c + df3168c commit 39e53a7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
4 changes: 4 additions & 0 deletions dune_processes/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,7 @@

INSTALLED_APPS += ["django_bootstrap5"]
DJANGO_TABLES2_TEMPLATE = "django_tables2/bootstrap5.html"

INSTALLED_APPS += ["crispy_forms", "crispy_bootstrap5"]
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
CRISPY_TEMPLATE_PACK = "bootstrap5"
6 changes: 4 additions & 2 deletions main/templates/main/boot_process.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{% extends "main/base.html" %}
{% load crispy_forms_tags %}
{% load django_bootstrap5 %}

{% block title %}Boot Process{% endblock title %}

{% block content %}

<form action="{% url 'main:boot_process' %}" method="post">
{% csrf_token %}
{{ form }}
<input type="submit" value="Submit">
{{ form|crispy }}
{% bootstrap_button button_type="submit" content="Submit" %}
</form>

{% endblock content %}
34 changes: 33 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ druncschema = { git = "https://github.com/DUNE-DAQ/druncschema.git" }
django-tables2 = "^2.7.0"
django-bootstrap5 = "^24.2"
pytest-asyncio = "^0.24.0"
django-crispy-forms = "^2.3"
crispy-bootstrap5 = "^2024.2"

[tool.poetry.group.dev.dependencies]
pytest = "^8.3"
Expand Down

0 comments on commit 39e53a7

Please sign in to comment.