Modernise template: Django 6 / Python 3.14, security fixes, tests, docs & tooling - #19
Open
Serbel97 wants to merge 7 commits into
Open
Modernise template: Django 6 / Python 3.14, security fixes, tests, docs & tooling#19Serbel97 wants to merge 7 commits into
Serbel97 wants to merge 7 commits into
Conversation
- Setup layered application structure under `apps/` (e.g., `api`, `core`, `tests`). - Include templates for administration (`admin.py`), testing (`base.py`, `fixtures.py`), proposals (`.template.md`), and documentation (`mkdocs` with `docs/`). - Configure project guidelines: linting (flake8), formatting (Black), type-checking (mypy), and proposal-first workflow. - Introduce base test helpers (e.g., `Base` class with signed request logic). - Add Makefile for streamlined development commands (`test`, `migrate`, `format`, etc.). - Populate project with necessary configuration files for MkDocs, Flake8, and initial `.env` setup.
sopi20
reviewed
Jun 23, 2026
| # Generate using: https://djecrety.ir/ | ||
| SECRET_KEY= | ||
|
|
||
| EMAIL_IMAP_HOST='' |
There was a problem hiding this comment.
za mna by bolo pre uplnost fajn tuto pridat comment, ze tie EMAIL_IMAP sa tykaju iba cisto toho naseho django imap backendu, a pridat sem example aj pre klasicky smtp backend (kedze tie tu uplne chybaju, mozno okrem EMAIL_SENDER_NAME, ak ten sa tam pouziva)
- Drop `django.contrib.admin` from installed apps, URLs, and dependencies. - Remove custom admin forms, models, and fieldsets from `apps.core.admin`. - Adjust project settings and templates to align with the updated configuration. - Update documentation and placeholders (`README.md`, `CLAUDE.md`, `.authors.yml`). - Revert Redis image to version 6 for compatibility.
- Swap Redis for Valkey (a BSD-licensed alternative) to avoid restrictive licensing. - Update `docker-compose.yml` with Valkey image and configurations. - Add `REDIS_DB` to `.env.example` for improved flexibility.
Philliip
approved these changes
Jun 25, 2026
Philliip
requested changes
Jun 25, 2026
- Remove HSTS mention from CHANGELOG for accuracy. - Drop unused `REDIS_HOST` from `.env.example`.
Philliip
requested changes
Jul 2, 2026
| PGPASSWORD=admin | ||
|
|
||
| REDIS_HOST=localhost | ||
| REDIS_DB=0 |
Collaborator
There was a problem hiding this comment.
a toto nechces dat prec tiez ?
Philliip
force-pushed
the
feature/template-modernization
branch
from
July 5, 2026 15:39
114d8d1 to
8175301
Compare
- Enforce email normalization (`strip` and `lower`) in models, forms, and managers. - Add database-level case-insensitive unique constraint for `email` field. - Update user-related tests (`manager`, `views`, `db`) to validate expected behavior. - Enhance email validation logic in registration and update forms. - Refactor and expand tests to verify email handling during CRUD operations.
- Drop MkDocs-related dependencies, files, and configurations (`mkdocs-material`, `.authors.yml`, `mkdocs.yml`). - Transition to a markdown-only proposal system under `docs/proposals/`. - Update documentation and proposal guidelines in `CLAUDE.md` and `CHANGELOG`. - Refactor base model to leverage `RandomUUID` and improve field defaults. - Remove unused Makefile `docs` target and related build instructions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernises the template (Django 6 / Python 3.14), fixes a number of correctness and deployment bugs, and adds a test suite, documentation site, tooling and a
/ipproposal skill.Upgrades
PG*environment variables (PGHOST,PGPORT,PGUSER,PGPASSWORD,PGDATABASE)Security & correctness fixes
BasicBackendbase64 credential decodeUserDetail(self-or-permission) + fixed invertedUserCheckerdefault_permissionsnow includeview/changesocore.view_userexistsorder_byallow-list (Model.ORDERING_FIELDS) to prevent ordering injectionTokenManagercsrf_exempt) + production hardening (HSTS, secure cookies, SSL redirect,ALLOWED_HOSTS/CSRF_TRUSTED_ORIGINSfrom env)SECRET_KEYnow required (ImproperlyConfiguredif missing)Deployment fixes
supervisor.confuses the project WSGI module (was hard-codedveolia_api)supervisordconfig path between Dockerfile and entrypointdocker-compose.ymlDB credentials, volumes and healthcheckAdmin & models
UserAdmin,ApiKey/Token/RecoveryCode), addedis_staffdb_defaulton boolean/choice model fieldsObservability & tooling
LOGGINGconfig (console,LOG_LEVEL)Makefile(run,test,lint,typecheck,migrations,docs)Documentation
.authors.yml/ipskill for quick proposal captureCLAUDE.mdwith project structure, code style, testing and the proposal workflowTesting
unittestsuite (46 tests) covering API views, services and database behaviour (soft-delete, token expiry, managers, ordering), with signed (X-Apikey+X-Signature) request helpersPost-generation
hooks/post_gen_project.pygenerates.envwith a freshSECRET_KEYon project creationValidation
Verified against a freshly rendered project on Postgres:
makemigrations+migrate, 46 tests pass,flake8/mypyclean,manage.py checkclean, dev server boots.🤖 Generated with Claude Code