Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that you need to jum...
The Django Base Site is an opinionated starter template designed to accelerate new Django projects. Lovingly maintained for over twelve years, it incorporates best practices and essential tools to save days of mundane setup, enabling rapid deployment to production.
🧑💻 Best Practices:
python-json-logger and readable-log-formatter for better log parsing.📦️ Django Packages:
🔧 Python Testing Tools:
🩺 Code Quality, Formatting, and Linting Tools:
💄 Frontend:
📝 Documentation:
Requirements: Ensure Docker and Just are installed.
Quickstart Install Script:
bash <(curl -s https://raw.githubusercontent.com/epicserve/django-base-site/main/scripts/start_new_project)This script customizes your project setup. After running, navigate to your project directory and start Docker Compose with just start.
Manual Installation:
$ curl -LOk https://github.com/epicserve/django-base-site/archive/main.zip && unzip main
$ mv django-base-site-main example
$ cd example
$ export SECRET_KEY=$(python -c "import random; print(''.join(random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789%^&*(-_=+)') for i in range(50)))")
$ cat > .env <<EOF
DEBUG=on
SECRET_KEY='$SECRET_KEY'
DATABASE_URL=postgres://postgres:@db:5432/postgres
INTERNAL_IPS=127.0.0.1,0.0.0.0
EOF
$ just remove_extra_files
$ find ./public -name ".keep" | xargs rm -rf
$ just startThe project includes Just recipes for common development tasks. Run just in the root directory for a full list. Common commands include build_assets, clean, collectstatic, format, lint, upgrade_python_requirements, open_coverage, start, start_with_docs, stop, and test.
The Django Base Site is production-ready with a multi-stage Dockerfile (config/docker/Dockerfile.web). A blog post details its use with fly.io, and contributions for other PaaS providers are welcome.