Skip to content

Commit

Permalink
Install HTMX per docs
Browse files Browse the repository at this point in the history
 - install django-htmx
 - add into requirements.in
 - add into settings
 - add script cdn into base to make available project wide.
  • Loading branch information
ryaustin committed Oct 6, 2023
1 parent b32a64d commit 6c9666f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django_htmx",
"cmp",
]

Expand All @@ -69,6 +70,7 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django_htmx.middleware.HtmxMiddleware",
"debug_toolbar.middleware.DebugToolbarMiddleware",
]

Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Django==4.2.5
django-environ
django-debug-toolbar
django-htmx
pytest-django
sentry-sdk
pytest-cov # used to generate coverage report
Expand Down
1 change: 1 addition & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
{% block content %}{% endblock %}
{% block scripts %}{% endblock %}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]" integrity="sha384-FhXw7b6AlE/jyjlZH5iHa/tTe9EpJ1Y55RjcgPbjeWMskSxZt1v9qkxLJWNJaGni" crossorigin="anonymous"></script>
</body>
</html>

0 comments on commit 6c9666f

Please sign in to comment.