Djangot
Djangot
COMMANDS
1.django-admin startproject
projectname .
2.python manage.py runserver
3.django-admin startapp appname
4.views.py
Import httpresponse
Create function and return
response
5.create urls.py in app module
Import path and views
Create urlpatterns and inside
create path
6.urls.py in project module
Import path and include
Create urlpatterns and inside
create path
7.models.py
Create class and create your
attribute names inside the class
8.Database connectivity
9.python manage.py makemigrations
10.settings.py
Installed app – insert your app
config
11.python manage.py makemigrations
12.python manage.py migrate
13.python manage.py runserver
14.create your admin username and
password
15.python manage.py createsuperuser
16.admin.py
Import models and register your
class
17.Add your products in your website
18.admin.py
Create class for your admin and
display the list
19.create templates folder in your app
module
Create html files inside the folder
20.views.py
Import models and insert your
objects
21.home.html
Insert your attributes using
bootstrap
Add your card template
22.base.html
Create starter template