HTTP Frontend as a django app for argus-server using HTMx
Project description
Experimental frontend for argus-server as a django app.
Will possibly cease to exist as a separate app if the experiment is deemed successful.
See argus-server for more abour argus.
Imports django-htmx. See the documentation for django-htmx for details.
How to play
Install
To make sure you do not accidentally work on an old argus-server, do the following:
Use/make a venv, for instance: create a new one with python -m venv argus-htmx
Check out argus-server code
Install argus-server dynamically into the venv: pip install -e .
Check out this repo
Install this app dynamically into the venv: pip install -e .
It is now safe to remove argus-server from the venv if you feel like it.
Configure
Do this in your workdir, which could be the checked out argus-server repo.
Django-style
In your local settings that star-imports from an argus-server settings file:
INSTALLED_APPS += [ "django_htmx", "argus_htmx", ] ROOT_URLCONF = "urls.py" MIDDLEWARE += ["django_htmx.middleware.HtmxMiddleware"]
Next to localsettings.py create an urls.py containing:
from argus.site.urls import urlpatterns urlpatterns += [ path("", include("argus_htmx.urls") ]
With EXTRA_APPS
In your environment variables:
ARGUS_EXTRA_APPS = '[{"app_name": "django_htmx"},{"app_name": "argus_htmx","urls": {"path": "", "urlpatterns_module": "argus_htmx.urls"}}]'
In your local settings that star-imports from an argus-server settings file:
MIDDLEWARE += ["django_htmx.middleware.HtmxMiddleware"]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for argus_htmx_frontend-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b524232c17c9c987df52715eff6ee45d023fc8f7d811c72a897bb7d33db7f02a |
|
MD5 | d42a2203ab81c9a228f4c285d93d55bf |
|
BLAKE2b-256 | 98f5c8ac3f818b0866e1563529d44d672b8dfd48857c6ef0b77d920a78d80e43 |