Show Menu
Cheatography

DJangoCheatSheet Cheat Sheet (DRAFT) by

Django Framework with Python

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Create a new DJango project

DJango­-admin startp­roject MyProject
Goto MyProject Folder
Python manage.py startapp MyApp
Open settin­gs.py file

Django Project settings

add app name in INSTALLED APPS []
Open views.py file
create a view e.g def index(­req­uest) return HttpRe­spo­nse­("Hello World")
Open urls.py file and add url pattern as path("i­nde­x/",­vie­ws.i­ndex)