Skip to content

Latest commit

 

History

186 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Project Template

English | Русский

A practical starting point for Django projects with a modern frontend build.

Technologies

  • Python 3.13 with uv for backend dependencies
  • Django 5.2 LTS as the web framework
  • Node.js 25 with Vite for asset pipeline (integrated via django-vite)
  • ESLint and Ruff for linting
  • Sass for styles
  • Gunicorn for production WSGI serving
  • django-axes for login throttling

Getting Started

  1. Create a new project from the template django-admin startproject project_name --template=https://github.com/1vank1n/django-project-template/archive/master.zip

  2. Install Python and Node dependencies make deps

  3. Adjust environment variables .env.template → .env

  4. Apply migrations and run development servers

    uv run python manage.py migrate
    uv run python manage.py runserver   # backend
    pnpm dev                            # Vite dev server with HMR
    

Deployment

  • Set production values in .env (disable DEBUG, set SECRET_KEY, configure DATABASE_URL, tune GUNICORN_*)
  • Run make deploy — builds image, starts container, applies migrations, collects static

Storage (optional S3)

Static and media files are served from local static/ and media/ by default. To offload them to S3-compatible storage (AWS S3, MinIO, Cloudflare R2, Backblaze B2, etc.), set AWS_STORAGE_BUCKET_NAME in .env — everything else switches automatically.

Minimal .env for S3:

AWS_STORAGE_BUCKET_NAME=my-bucket
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_S3_REGION_NAME=us-east-1
# AWS_S3_ENDPOINT_URL=https://<minio-or-r2-endpoint>/   # only for S3-compatible
# AWS_S3_CUSTOM_DOMAIN=cdn.example.com                  # only for public CDN

If AWS_STORAGE_BUCKET_NAME is empty — Django falls back to local filesystem.

Project Structure

applications/     Django apps (core, main)
frontend/         source frontend files (images, scripts, styles)
settings/         Django project settings (split-settings components)
templates/        Django templates
static/           compiled static assets (generated by Vite)
logs/             runtime logs
gunicorn.conf.py  Gunicorn configuration (reads GUNICORN_* env vars)
vite.config.js    Vite configuration

Configuration Files

  • .editorconfig – editor formatting rules
  • eslint.config.js – ESLint rules (flat config)
  • .gitignore – files ignored by Git
  • .dockerignore – files excluded from Docker build context
  • .nvmrc – Node.js version for nvm
  • .python-version – Python version for pyenv
  • .env.template – default environment variables for local development

License

MIT — see LICENSE. Use it freely in commercial and open-source projects.

Contact

Questions? Create an issue or email lukyanets.ivan@gmail.com

About

Modern Django boilerplate — uv, Vite, Django 5.2 LTS, django-axes, optional S3. Python 3.13, MIT.

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages