A collection of examples on how to do various tasks with HTMX and Django.
Go to file
Andreas Zweili f3f9b14a7e Add a User model 2023-10-08 19:42:05 +02:00
src Add a User model 2023-10-08 19:42:05 +02:00
.editorconfig Add edditor config 2023-08-28 20:35:59 +02:00
.envrc Remove poetry2nix 2023-09-27 20:02:10 +02:00
.gitignore Add django project 2023-07-24 14:18:12 +02:00
LICENSE Initial commit 2023-07-24 10:23:26 +02:00
Procfile Add basic tooling 2023-07-24 14:18:12 +02:00
README.md Add basic tooling 2023-07-24 14:18:12 +02:00
dev.sh Open firewall port for webui 2023-09-27 20:10:15 +02:00
flake.lock Remove poetry2nix 2023-09-27 20:02:10 +02:00
flake.nix Remove poetry2nix 2023-09-27 20:02:10 +02:00
poetry.lock Remove poetry2nix 2023-09-27 20:02:10 +02:00
poetry.toml Add Python packages and settings 2023-07-24 14:18:12 +02:00
pyproject.toml Add poetry2nix 2023-08-28 20:41:05 +02:00

README.md

django_htmx_examples

A collection of examples on how to do various tasks with HTMX and Django.

Setup

There is currently only one supported way to work with this repository. You will need a Linux system (WSL might work) onto wich you install the Nix package manager with Flakes enabled1 and direnv2. Afterwards you can enter the development environment with direnv allow.

After you've entered the development environment with either method you can start the development server with dev run. This will start a PostgreSQL database running and start the Django development server.

In case you want a fresh start or remove the project you can just remove the .direnv and .venv directory at the root of the project. All the data of the PostgreSQL database is stored there together with the symlinks to the Nix store.

In case you want to tweak something these are the applications use do build the development environment:

  • Nix package manager
  • direnv
  • overmind3

The dev command is a simple BASH script called dev.sh at the root of the project.

Run the dev command without an argument to see all options.

Manual way

The manual way you have to install poetry4 and then run poetry shell to enter the virtual environment. You will then need a local PostgreSQL server or modify the settings so that you can use your prefered database.

Please note that I will only use and test the first method.