-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
25 lines (15 loc) · 799 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
When someone visits the website, the url gets checked in urls.py, if url is found
it passes the HTTPResponse that is returned by the function that has been assigned to that url or route
Now inside an HTTPResponse, we can pass HTML code, which are called as templates
Model --> Template -->View
User comes, urls get checked, if url present , it's view function gets called which returns a template in response
To create an app
python manage.py startapp 'appname'
then add the app name to settings.py in project folder
'app.apps.AppConfig'
python manage.py migrate
to set initial migrations
python manage.py makemigrations to set app and models
to create admin account for access
python manage.py createsuperuser
website/admin gives access to the backend django database that contains tables