From ec932ef68a55375abeea6c13d9b895e6e4eb0ca5 Mon Sep 17 00:00:00 2001 From: Janek Mangold Date: Mon, 13 Jul 2026 13:45:28 +0200 Subject: [PATCH 1/4] feat: update README with additional Renovate Dog instructions and new project template details --- README.md | 1 + django/README.md | 41 +++++++++++++++++++ .../{{ cookiecutter.project_slug }}/README.md | 2 + 3 files changed, 44 insertions(+) create mode 100644 django/README.md diff --git a/README.md b/README.md index 85cec16..1c8ade7 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ cookiecutter https://github.com/singularit-de/cc-python.git --directory django --checkout v1.1.0 ``` +For Django projects, see the [Django README](django/README.md) for details on the template and the questions you’ll be asked during project creation. ## Why we are using templates Cookiecutter templates ensure consistency, standardization, and best practices across all Python projects at singularIT. They: diff --git a/django/README.md b/django/README.md new file mode 100644 index 0000000..bb68102 --- /dev/null +++ b/django/README.md @@ -0,0 +1,41 @@ +# Cookiecutter Django + +## Features + +- Django 6 +- Python 3.14, 3.13, 3.12 +- PostgreSQL 18, 17, 16 +- Package and Project management with uv +- Pre-commit hooks for code quality and formatting + - ruff +- Optional DRF (Django Rest Framework) setup +- GitLab CI/CD + - pre-commit checks + - django tests + - deployment checks + - automated deployment to our staging environment +- Dependency Tracking + +## `cookiecutter.json` questions + +1. `project_name` - Human-readable project name + - Used in the README and API documentation. + +2. `project_slug` - Project identifier / Python package name (slugified) + - Used throughout the codebase, e.g. in `import` statements, as the Django project/module name, and in the GitLab CI/CD configuration. + - Use a valid Python module name (typically lowercase letters, numbers, and underscores; must not start with a number). + +3. `customer` - Customer/client name (optional) + - Used in the README. + +4. `python_version` - Python version for the project + - Prefer the latest stable Python version that is supported by Django and your dependencies. + +5. `postgresql_version` - PostgreSQL version for the project + - Prefer the latest stable PostgreSQL version. + +6. `username_type` - Identifier used to log in (for the Django user model) + - Commonly set to `email` for customer projects. (This affects the custom user model and should be chosen early.) + +7. `use_drf` - Include Django REST Framework (DRF) + - If set to `yes`, DRF, drf-spectacular, django-filter, and django-cors-headers will be installed and preconfigured. \ No newline at end of file diff --git a/django/{{ cookiecutter.project_slug }}/README.md b/django/{{ cookiecutter.project_slug }}/README.md index 5acff68..ff0cf67 100644 --- a/django/{{ cookiecutter.project_slug }}/README.md +++ b/django/{{ cookiecutter.project_slug }}/README.md @@ -59,6 +59,8 @@ git push --set-upstream origin main ``` +7. Add our [Renovate Dog](https://singular-code.de/renovate.dog) to the GitLab repository and follow the instructions in the [BetterWiki article](https://singularit.singular-pages.de/better-wiki/wiki/tools/renovate-bot/#wie-kann-ich-den-renovate-bot-benutzen). + **------------------- END DELETE SECTION --------------------** ## Get started locally From 26b0284bf2e67a56d56ea04349abbd269ce7272a Mon Sep 17 00:00:00 2001 From: Janek Mangold Date: Mon, 13 Jul 2026 15:11:45 +0200 Subject: [PATCH 2/4] feat: enhance README with details on the common directory --- django/README.md | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/django/README.md b/django/README.md index bb68102..9d6e774 100644 --- a/django/README.md +++ b/django/README.md @@ -7,35 +7,44 @@ - PostgreSQL 18, 17, 16 - Package and Project management with uv - Pre-commit hooks for code quality and formatting - - ruff + - ruff - Optional DRF (Django Rest Framework) setup - GitLab CI/CD - - pre-commit checks - - django tests - - deployment checks - - automated deployment to our staging environment + - pre-commit checks + - django tests + - deployment checks + - automated deployment to our staging environment - Dependency Tracking +- Custom `User` model +- ``common`` directory with utility functions and classes ## `cookiecutter.json` questions 1. `project_name` - Human-readable project name - - Used in the README and API documentation. + - Used in the README and API documentation. 2. `project_slug` - Project identifier / Python package name (slugified) - - Used throughout the codebase, e.g. in `import` statements, as the Django project/module name, and in the GitLab CI/CD configuration. - - Use a valid Python module name (typically lowercase letters, numbers, and underscores; must not start with a number). + - Used throughout the codebase, e.g. in `import` statements, as the Django project/module name, and in the GitLab + CI/CD configuration. + - Use a valid Python module name (typically lowercase letters, numbers, and underscores; must not start with a + number). 3. `customer` - Customer/client name (optional) - - Used in the README. + - Used in the README. 4. `python_version` - Python version for the project - - Prefer the latest stable Python version that is supported by Django and your dependencies. + - Prefer the latest stable Python version that is supported by Django and your dependencies. 5. `postgresql_version` - PostgreSQL version for the project - - Prefer the latest stable PostgreSQL version. + - Prefer the latest stable PostgreSQL version. 6. `username_type` - Identifier used to log in (for the Django user model) - - Commonly set to `email` for customer projects. (This affects the custom user model and should be chosen early.) + - Commonly set to `email` for customer projects. (This affects the custom user model and should be chosen early.) 7. `use_drf` - Include Django REST Framework (DRF) - - If set to `yes`, DRF, drf-spectacular, django-filter, and django-cors-headers will be installed and preconfigured. \ No newline at end of file + - If set to `yes`, DRF, drf-spectacular, django-filter, and django-cors-headers will be installed and preconfigured. + +## ``common`` directory + +The ``common`` directory contains basic utility functions for models, Django management commands, tests. If DRF is +enabled, it also contains filters, a BinaryRenderer and a MultipleSerializersMixin for ViewSets. \ No newline at end of file From 33ba4bb5f769d2bad57fd66d76e2a17759bd83c6 Mon Sep 17 00:00:00 2001 From: Janek Mangold Date: Mon, 13 Jul 2026 15:28:41 +0200 Subject: [PATCH 3/4] feat: add link to BetterWiki article for Dependency Track information --- django/{{ cookiecutter.project_slug }}/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/django/{{ cookiecutter.project_slug }}/README.md b/django/{{ cookiecutter.project_slug }}/README.md index ff0cf67..5f5bc32 100644 --- a/django/{{ cookiecutter.project_slug }}/README.md +++ b/django/{{ cookiecutter.project_slug }}/README.md @@ -107,6 +107,7 @@ GitLab CI/CD is a continuous integration and continuous deployment service built To track vulnerabilities in dependencies we are using our Dependency Track Dashboard. The dashboard is updated with every push to the default branch or a created tag. The dashboard is updated with the help of the `uv.lock` file that is generated by uv. +Have a look at our [BetterWiki article](https://singularit.singular-pages.de/better-wiki/wiki/ci-cd/sbom/#dependency-tracking) for more information about Dependency Track and how to use it. You can view our Dependency Track Dashboard [here](https://dependency-track.v3.singular-it-test.de/). ### Stages From 1dfbbfb67d0ba69f1b1d9a20f3e68a2b7c815f27 Mon Sep 17 00:00:00 2001 From: Janek Mangold Date: Tue, 14 Jul 2026 12:00:56 +0200 Subject: [PATCH 4/4] feat: add links to BetterWiki article and Dependency Track Dashboard in README --- django/{{ cookiecutter.project_slug }}/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/{{ cookiecutter.project_slug }}/README.md b/django/{{ cookiecutter.project_slug }}/README.md index 5f5bc32..60cdc65 100644 --- a/django/{{ cookiecutter.project_slug }}/README.md +++ b/django/{{ cookiecutter.project_slug }}/README.md @@ -107,7 +107,9 @@ GitLab CI/CD is a continuous integration and continuous deployment service built To track vulnerabilities in dependencies we are using our Dependency Track Dashboard. The dashboard is updated with every push to the default branch or a created tag. The dashboard is updated with the help of the `uv.lock` file that is generated by uv. + Have a look at our [BetterWiki article](https://singularit.singular-pages.de/better-wiki/wiki/ci-cd/sbom/#dependency-tracking) for more information about Dependency Track and how to use it. + You can view our Dependency Track Dashboard [here](https://dependency-track.v3.singular-it-test.de/). ### Stages