Wednesday, 6 July 2016

Django Terms

Best Editor For making django projects is  "Sublime text"


Django  is "python web framework"
To start a new project ->>              django-admin startproject 'project nm'
To start the server ->>                    python manage.py runserver
To create a new app ->>                 python manage.py startapp "music"
To create a super user ->>              python manage.py createsuperuser

each url is connected to a view
1) view gives Httpresponse
2) when we make app we hv to mention  in settings. file

3) when we udpate smthing in databse ,
3.a) do it in  models.py file ,
3.b) python manage.py makemigrations 'app name'
3.c) python manage.py migrate
  now databse is synced with code

No comments:

Post a Comment