manage.py Cheat Sheet
Cheat Sheet covering Django's manage.py
API: /api/v1/cheatsheet/managepy-cheat-sheet
General syntax:
⧉
1 | |
Project Setup
Create migrations
⧉
1 | |
Generate migration files based on model changes.
Apply migrations
⧉
1 | |
Apply migrations to the database.
Show migration status
⧉
1 | |
See applied and pending migrations.
Development Server
Start server
⧉
1 | |
Default: http://127.0.0.1:8000/
Start on custom port
⧉
1 | |
Runs development server on port 8080
Expose to local network
⧉
1 | |
Apps
Create new app
⧉
1 | |
Creates Django app structure.
Users / Admin
Create superuser
⧉
1 | |
Used for Django admin access.
Change password
⧉
1 | |
Shell / Debugging
Open Django shell
⧉
1 | |
Useful for testing models and queries.
Example:
⧉
1 | |
Inside shell:
⧉
1 2 | |
Static Files
Collect static files (production)
⧉
1 | |
Copies static files into one target directory.
Testing
Run all tests
⧉
1 | |
Run specific app tests
⧉
1 | |
Database Utilities
SQL for migrations
⧉
1 | |
Flush database
⧉
1 | |
Deletes data, keeps schema.
Useful Flags
Specify settings file
⧉
1 | |
Verbose output
⧉
1 | |
Common Workflow
⧉
1 2 3 4 5 | |
Join the Newsletter
Practical insights on Django, backend systems, deployment, architecture, and real-world development — delivered without noise.
Get updates when new guides, learning paths, cheat sheets, and field notes are published.
No spam. Unsubscribe anytime.
There is no third-party involved so don't worry - we won't share your details with anyone.