- Python 77%
- HTML 22.7%
- JavaScript 0.3%
| .zed | ||
| accounts | ||
| authors | ||
| letters | ||
| locale | ||
| receivers | ||
| static | ||
| templates | ||
| texplates | ||
| wmletters | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .python-version | ||
| =2025.1.2 | ||
| LICENSE | ||
| manage.py | ||
| pyproject.toml | ||
| pytest.ini | ||
| README.md | ||
| todo.md | ||
| uv.lock | ||
wmletters
A django system for creating din-letters.
The content for the letters is stored in tables for authors, receivers, templates and letters. The app renders the context to a LaTeX file, which is compiled with pdflatex. The app returns the created PDF file.
LaTeX, Pandoc and ImageMagick must be installed in the system for generating the LaTeX file, compiling it to the pdf format and create thumbnails. As database system Postgresql must be installed and there must be created a user for wmletters. If you create a database, user and password for test purposes as wmletters you don't need to edit of the project settings.
The software is in alpha state and you should not be used it in production. I hope, I soon finish the most of testing and translation and create a beta version.
I have used uv to create the pyproject.toml file. For installing uv look at https://docs.astral.sh/uv/getting-started/installation/
First create and start a virtual environment:
uv venv
source .venv/bin/activate
After this the dependencies for python must be installed with:
uv sync
You have to create a .env file in this directory for the following values:
DJANGO_SECRET_KEY=a real secret key
DJANGO_DEBUG=TRUE #for now TRUE
DB_NAME="wmletters"
DB_USER="wmletters"
DB_PASSWORD="wmletters"
DB_HOST=name of the host or docker container
DB_PORT=5432 #for postgresq
LANGUAGE_CODE="de" # or another language code. Full translation so far: de and little parts en
TIME_ZONE="Europe/Berlin" # or wherever yoe live
To get a real secret key do the following in the python console:
from django.core.management.utils import
get_random_secret_key
Copy the secret key to the .env file. If the secret key contains a = character use quotation marks.
After this you must install the database tables and create a superuser for admin purposes.
uv run manage.py migrate
uv run manage.py createsuperuser
For localization start django-admin compilemessages.
For testing wmletters enter:
uv run manage.py runserver
Now you can call wmletters in the webbrowser with localhost:8000.
To create a new user call localhost:8000/admin.
You need to input one or more authors and receivers and a template. You can use the content of template-sample.txt for rendering. Create a template and copy the text to "LaTeX-Vorlage"