Skip to content

Repository files navigation

django-template is a Scaf template for creating production-ready Django web applications with modern tooling and best practices.

What This Template Provides

Generate Django projects with Docker Compose development environment, ASGI support, authentication, GraphQL API, optional Celery task queue, optional Sentry error tracking, and full CI/CD configuration for GitHub or GitLab.

Features

  • Django 6.0 with ASGI support via Daphne
  • Docker Compose development environment with PostgreSQL, Redis, and Mailpit
  • Authentication via django-allauth with email verification
  • GraphQL API with Strawberry and DataLoader
  • Optional Celery for distributed task processing with beat scheduler
  • Optional Sentry integration for error tracking
  • CI/CD scaffolding for GitHub Actions or GitLab CI
  • Semantic Release automation for versioning and changelogs
  • Secret Scanning with gitleaks in CI
  • PyCharm & VS Code debug configurations included
  • Nix development environment with direnv integration
  • 1Password CLI integration for secrets management
  • Choice of task runner (make, task, or just)
  • Comprehensive documentation for development, debugging, and upgrades

Copier Options

  • copier__project_name: Human-readable project name
  • copier__project_slug: Python identifier-style slug
  • copier__description: Short project description
  • copier__author_name: Author name
  • copier__domain_name: Project domain
  • copier__email: Author email
  • copier__timezone: Default timezone (e.g., America/New_York)
  • copier__use_celery: Enable Celery for task management
  • copier__use_sentry: Enable Sentry error tracking
  • copier__task_runner: Choose make, task, or just
  • copier__configure_repo: Enable repository remote setup
  • copier__repo_provider: github or gitlab
  • copier__repo_org: Organization/group name
  • copier__repo_name: Repository name
  • copier__create_repo: Auto-create repository if missing
  • copier__repo_visibility: private or public
  • copier__ci_provider: CI provider (inferred from repo provider)
  • copier__enable_semantic_release: Include semantic-release automation
  • copier__github_semantic_release_auth: github_token or github_app
  • copier__enable_secret_scanning: Include gitleaks secret scanning

Quick Start

# Local path
scaf my-django-project ./django-template

# Git URL
scaf my-django-project https://github.com/getscaf/django-template.git

Testing This Template

Run local render tests:

make test-template-render

CI runs the same command in .github/workflows/template-render-tests.yaml.

Generated Project Docs

Each generated project includes:

  • docs/development.md - Local development setup and workflows
  • docs/debug.md - Debugging with PyCharm and VS Code
  • docs/project-overview.md - Architecture and technology stack
  • docs/using-template.md - Day-to-day template usage
  • docs/upgrading.md - Copier update workflow
  • docs/semantic-release-github.md (when GitHub + semantic-release is enabled)
  • docs/semantic-release-gitlab.md (when GitLab + semantic-release is enabled)

These cover day-to-day usage and copier update workflow for downstream projects.

License

Apache-2.0. See LICENSE.

About

The template for standalone django

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages