Django project for writing letters with LaTeX
  • JavaScript 98.3%
  • Python 1.4%
  • HTML 0.3%
Find a file
2026-07-12 18:33:35 +02:00
.zed Some minor changes 2025-12-13 00:26:05 +01:00
accounts Changed imports by isort 2026-07-12 12:06:54 +02:00
authors Changed imports by isort 2026-07-12 12:06:54 +02:00
doc_types Changes in pre-commit 2026-07-12 18:33:35 +02:00
letters Changed imports by isort 2026-07-12 12:06:54 +02:00
locale HTMXified views 2026-04-18 16:42:51 +02:00
receivers Changes in pre-commit 2026-07-12 18:33:35 +02:00
static Changes in pre-commit 2026-07-12 11:38:13 +02:00
templates Changes in pre-commit 2026-07-12 11:38:13 +02:00
texplates Changes in pre-commit 2026-07-12 18:33:35 +02:00
wmletters Changes in pre-commit 2026-07-12 18:33:35 +02:00
.dockerignore Corrected tests for authors and texplates. 2026-02-14 17:48:27 +01:00
.editorconfig Some minor changes 2025-08-13 16:04:31 +02:00
.gitignore Changes in pre-commit 2026-07-12 11:38:13 +02:00
.pre-commit-config.yaml Changes in pre-commit 2026-07-12 18:33:35 +02:00
.python-version Some minor changes 2025-08-13 16:04:31 +02:00
=2025.1.2 Some minor changes 2025-08-13 16:04:31 +02:00
LICENSE Some minor changes 2025-08-13 16:04:31 +02:00
manage.py First commit on new server 2025-05-11 13:38:24 +02:00
pyproject.toml Changes in pre-commit 2026-07-12 18:33:35 +02:00
pytest.ini Some minor changes 2025-08-13 16:04:31 +02:00
README.md Changes in pre-commit 2026-07-12 11:38:13 +02:00
setup.cfg Changes in pre-commit 2026-07-12 18:33:35 +02:00
todo.md Changes in pre-commit 2026-07-12 11:38:13 +02:00
uv.lock Changes in pre-commit 2026-07-12 18:33:35 +02:00
wmletters.dot Changes in pre-commit 2026-07-12 11:38:13 +02:00
wmletters.png Changes in pre-commit 2026-07-12 11:38:13 +02:00

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"