Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/l4rm4nd/django-ultimate
The ultimative Django 5 Boostrap Template based on NiceAdmin, UWSGI and Django-Celery-Beat with support for OIDC SSO.
https://github.com/l4rm4nd/django-ultimate
Last synced: 5 days ago
JSON representation
The ultimative Django 5 Boostrap Template based on NiceAdmin, UWSGI and Django-Celery-Beat with support for OIDC SSO.
- Host: GitHub
- URL: https://github.com/l4rm4nd/django-ultimate
- Owner: l4rm4nd
- Created: 2024-07-29T19:45:33.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-18T08:48:31.000Z (about 2 months ago)
- Last Synced: 2024-09-18T11:38:19.660Z (about 2 months ago)
- Language: CSS
- Homepage:
- Size: 13.9 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
## ⭐ Features
- Django Framework (v5)
- Productive UWSGI webserver
- SQLite3 and PostgreSQL database support
- Nice Admin Bootstrap Template with light/dark theme
- Django-Celery-Beat for Periodic Task Execution
- OIDC Single-Sign-On via `mozilla-django-oidc`
- Custom Login Panel with support for local auth and OIDC SSO
- GitHub Action for automatic changelogs, releases, code SAST scanning and docker image builds based on Conventional Commits specification## 💡 Usage
````
# clone this repository
git clone https://github.com/l4rm4nd/Django-Ultimate && cd Django-Ultimate# create virtual environment and activate
virtualenv venv
source venv/bin/activate# install requirements
pip install -r requirements.txt# collect migrations
python manage.py makemigrations
python manage.py makemigrations myapp# migrate
python manage.py migrate
python manage.py migrate myapp# create superuser
python manage.py createsuperuser# spawn the development server
python manage.py runserver 127.0.0.1:8000 --insecure
````## 🌏 Environment Variables
Django Ultimate template takes various environment variables to configure `settings.py`:
| Variable | Description | Default | Optional/Mandatory |
|----------------------------------|-----------------------------------------------------------------------------------------------------------------|----------------------------|---------------------|
| `DOMAIN` | Your Fully Qualified Domain Name (FQDN) or IP address. Used to define `ALLOWED_HOSTS` and `CSRF_TRUSTED_ORIGINS` for the Django framework. | `localhost` | Mandatory |
| `SECURE_COOKIES` | Set to `True` if you use a reverse proxy with TLS. Enables the `secure` cookie flag and `HSTS` HTTP response header, which will only work for SSL/TLS encrypted communication channels (HTTPS). | `False` | Optional |
| `SECRET_KEY` | Defines a fixed secret key for the Django framework. If missing, a secure secret is auto-generated on the server-side each time the container starts. | `` | Optional |
| `PORT` | Defines a custom port. Used to set `CSRF_TRUSTED_ORIGINS` in conjunction with the `DOMAIN` environment variable for the Django framework. Only necessary, if VoucherVault is operated on a different port than `8000`, `80` or `443`. | `8000` | Optional |
| `TZ` | Defines the `TIME_ZONE` variable in Django's settings.py. | `Europe/Berlin` | Optional |
| `REDIS_URL` | Defines the Redis URL to use for Django-Celery-Beat task processing. | `redis://redis:6379/0` | Optional |
| `OIDC_ENABLED` | Set to `True` to enable OIDC authentication. | `False` | Optional |
| `OIDC_CREATE_USER` | Set to `True` to allow the creation of new users through OIDC. | `True` | Optional |
| `OIDC_RP_SIGN_ALGO` | The signing algorithm used by the OIDC provider (e.g., RS256, HS256). | `HS256` | Optional |
| `OIDC_RP_IDP_SIGN_KEY` | The signing key used by the OIDC provider. If RS256 signing algo is used, either this or `OIDC_OP_JWKS_ENDPOINT` must be defined. | `None` | Optional |
| `OIDC_OP_JWKS_ENDPOINT` | URL of the JWKS endpoint for the OIDC provider. If RS256 signing algo is used, either this or `OIDC_RP_IDP_SIGN_KEY` must be defined. | `None` | Optional |
| `OIDC_RP_CLIENT_ID` | Client ID for your OIDC RP. | `None` | Optional |
| `OIDC_RP_CLIENT_SECRET` | Client secret for your OIDC RP. | `None` | Optional |
| `OIDC_OP_AUTHORIZATION_ENDPOINT` | Authorization endpoint URL of the OIDC provider. | `None` | Optional |
| `OIDC_OP_TOKEN_ENDPOINT` | Token endpoint URL of the OIDC provider. | `None` | Optional |
| `OIDC_OP_USER_ENDPOINT` | User info endpoint URL of the OIDC provider. | `None` | Optional |
| `OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS` | The length of time it takes for an id token to expire in seconds. | 900 | Optional |
| `DB_ENGINE` | Database engine to use (e.g., `postgres` for PostgreSQL or `sqlite3` for SQLite3). | `sqlite3` | Optional |
| `POSTGRES_HOST` | Hostname for the PostgreSQL database. | `db` | Optional |
| `POSTGRES_PORT` | Port number for the PostgreSQL database. | `5432` | Optional |
| `POSTGRES_USER` | PostgreSQL database user. | `django-ultimate` | Optional |
| `POSTGRES_PASSWORD` | PostgreSQL database password. | `django-ultimate` | Optional |
| `POSTGRES_DB` | PostgreSQL database name. | `django-ultimate` | Optional |## 📷 Screenshots
![PoC](https://github.com/user-attachments/assets/19a06770-fa54-4ce9-8934-da838a721650)
![image](https://github.com/user-attachments/assets/b86093ec-4677-41a9-9e62-3dfde1309738)