Django Base Site

screenshot of Django Base Site
django
vite
bootstrap
scss

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 jumpstart your next project.

Overview

The Django Base Site is an opinionated starter template designed to quickly start new Django projects. It has been maintained for over twelve years and has been used as a foundation for many other projects. This template helps teams stay organized and collaborate effectively as the project grows. By incorporating best practices and tools, it saves time on setup and tooling. With the Django Base Site, you can deploy your site to production in minutes instead of days.

Features

  • Best Practices: The Django Base Site follows best practices and includes tools such as Environs for managing environment variables, Docker Compose for development, and a multi-stage Dockerfile for production-ready Docker image setup. It also utilizes Pip Tools for maintaining Python requirements and Just for running common commands.
  • Django Packages: This starter template includes popular Django packages like Django 5, Celery for running asynchronous tasks, a custom user model for easy extension, Django Allauth for authentication workflows, Django Crispy Forms for working with Django forms, Django Alive for health checks, and Django Maintenance Mode for maintenance mode functionality.
  • Python Testing Tools: The Django Base Site incorporates essential Python testing tools such as Pytest as the test runner, Pytest Django plugin for Django-specific testing, Pytest-cov for code coverage, Model Bakery for faster creation of model instances for tests, and Django Test Plus for helper functions to write tests faster.
  • Code Quality, Formatting, and Linting Tools: To ensure code quality, the template includes tools like Black for automatic Python code formatting, Ruff for extra linting written in Rust, Mypy for Python type checking, dj Lint for Django HTML template formatting and linting, Django Debug Toolbar for debugging and optimizing Django queries, Bandit for automated security checking, Stylelint for Sass formatting and linting, and Eslint for automatic JavaScript formatting and linting.
  • Frontend: The Django Base Site includes Bootstrap 5, a popular UI framework, and Vite, a fast frontend build tool.
  • Documentation: The template uses MkDocs for documentation and includes plugins like MkDocs Material for a beautiful theme, mkdocstrings for building documentation from Python docstrings, mkdocs-include-markdown-plugin to include docs from other files, and mkdocs-linkcheck for automatic link checking.

Summary

The Django Base Site is a powerful starter template for Django projects that incorporates best practices, essential packages, testing tools, and code quality tools. It provides a smooth development experience and helps teams collaborate effectively. With the included frontend tools and documentation plugins, it allows for efficient frontend development and comprehensive project documentation. Installing the template is easy with Docker and Just, and it enables quick deployment to production. Overall, the Django Base Site is a valuable resource for starting Django projects and accelerating development timelines.

django
Django

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the model-view-controller (MVC) architectural pattern, providing an extensive set of built-in tools and conventions to streamline the creation of robust and scalable web applications.

vite
Vite

Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects

bootstrap
Bootstrap

Bootstrap is the most popular CSS Framework for developing responsive and mobile-first websites.

scss
SCSS

SCSS is a preprocessor scripting language that extends the capabilities of CSS by adding features such as variables, nesting, and mixins. It allows developers to write more efficient and maintainable CSS code, and helps to streamline the development process by reducing repetition and increasing reusability.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

Stylelint

Stylelint is a modern linter for CSS that helps you avoid errors and enforce consistent styling conventions. It provides rules for detecting errors and warnings, and can be configured to match your specific project's requirements.