Installation & Configuration¶
Let's start from a clean baseline and get a project running with the right defaults. django-mindoff provides a structured foundation for building APIs with predictable scaffolding and consistent runtime conventions.
By following these steps, you'll have a fully configured project ready for development.
Prerequisites¶
- Python
>=3.12 pipgit- An empty or dedicated project directory
Implementation¶
1. Install django-mindoff¶
The installation exposes the CLI:
2. Initialize a New Project¶
From your project directory:
Heads up!
django-mindoff init sets up a virtual environment, git and installs the framework's compatible dependency set automatically. This includes core packages such as Django, Django REST Framework, Polars, and supporting runtime/testing dependencies required by the scaffold.
For full dependency details, see Architecture Requirements.
This may take a few minutes
django-mindoff init can take some time to complete depending on internet speed and system capabilities.
The command scaffolds a runnable project, including:
manage.py-- Django management entry point.mindoff.py-- Local CLI entry point for app/model/API scaffolding tasks..env-- Environment configuration file generated for local setup.pytest.ini-- Base test runner configuration.README.md-- Project-level readme scaffold.config/-- Core Django configuration package. Typically includes:settings.py,urls.py,asgi.py,wsgi.py, andresponses.csv.apps/-- Workspace for all domain apps we create with the CLI.templates/-- Base HTML templates created by the scaffold.
For the full directory tree and architecture-level breakdown, see Management Kit.
3. Configure Core Settings¶
Open config/settings.py and set core defaults for local development:
If queue/background processing is needed, set Redis in .env ( see
Queue Mode API for more details.):
Then load it in config/settings.py (if not already configured):
4. Run Virtual Environment¶
Before running migrations or starting the server, activate the project's virtual environment.
Windows (Command Prompt):
Windows (PowerShell):
macOS/Linux:
5. Run the Project¶
Run initial migrations to prepare your database:
Start the server:
If the server starts without configuration errors, setup is complete. Continue to App and Model Setup.
Troubleshooting¶
django-mindoff: command not found
Install with the same Python interpreter you use for the project environment.ModuleNotFoundErrorduring startup
Activate your virtual environment, then reinstall dependencies.