Frameworks
Django Cheat Sheet
Print-ready cheat sheet for Django, organized for fast lookup, study, and desk-side use
Sample
What's in this cheat sheet
- Project Setup
- Models
- Views
- Templates
- URLs
- Forms
- Admin
- ORM Queries
- Authentication
- Settings
Create Project & App
pip install django
django-admin startproject mysite
cd mysite
python manage.py startapp blog
Common Commands
runserver | Start dev server on port 8000 |
makemigrations | Generate migration files from model changes |
migrate | Apply migrations to database |
createsuperuser | Create admin superuser |
shell | Interactive Python shell with Django |
test | Run test suite |
Project Structure
manage.py | CLI entry point |
settings.py | Project configuration |
urls.py | Root URL configuration |
wsgi.py / asgi.py | Server entry points |
apps/models.py | Database models |
apps/views.py | Request handlers |
Download the full cheat sheet for all sections, formatted for print
Download PDFDownloads
Choose the treatment that matches how you read
-
Recommended
Standard
B&W, ink-efficient. The default for laser printers and photocopies
Best for Printouts and desk-side reference
-
Color
Warm color accents for on-screen reading or color printers
Best for Screen reading or color printers
-
Reference Card
Maximum density, 4-column layout. Everything on one page
Best for Fast scanning and minimum paper use