- Python 63.3%
- HTML 33.5%
- Just 3.2%
| src/django_project | ||
| .envrc | ||
| .gitignore | ||
| .python-version | ||
| bun.lock | ||
| LICENSE | ||
| package.json | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Web Toolkit
A few opinionated web based tools built with Django, HTMX and DaisyUI.
Development Setup
Most of development setup is handled by just, and you will need uv to setup Python. For code formatting, prettier is used, so you will need the bun JavaScript runtime.
Before any of these steps, make sure you are in the src/django_project directory.
cd src/django_project
Cache Needed Files & Download Dependencies
Run this command to do both:
just deps
After this, you don't need internet connection for other actions.
Dot env
Copy the sample dot env file and modify it to your liking:
cp .env.sample .env
$EDITOR .env
Run a dev server
Use this command to run a dev server in the port specified in the previous step:
just dev
You will want to run tailwind from another terminal, so your style changes in HTML will reflect in the compiled CSS:
just tailwind
Formatting the code
To format all the codebase, run this command:
just format
This will run ruff to format and sort imports for python code, and run prettier for everything else.
Delpoyment
Dot env
Copy .env.sample file into .env and edit it to your liking. Remember to generate a secure secret key.
cp .env.sample .env
$EDITOR .env
Dependencies
Run this command to download everything you need:
just deps
Reverse Proxy
Configure a reverse proxy like nginx or caddy for webtoolkit, according to the settings in .env.
Run Production Server
Start a tmux session and run this command to start a production server:
just prod
Detach from the tmux session, and you are all set.
System Service
Make a systemd service for the production server and enable it, so the server is more robust.