Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
50 changes: 50 additions & 0 deletions django/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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
- 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.

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.

## ``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.
2 changes: 2 additions & 0 deletions django/{{ cookiecutter.project_slug }}/README.md
Comment thread
Grayknife marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading