django-admin startproject <ProjectName>
python manage.py runserver
django-admin startapp <AppName>
MVT
- Model : - Models are the place in django where we have to define our database schemas.
- Views : - Unlike other frameworks view are not used for the templates. In django view file is use for writeing our business logics.
- Templates : - Templates are contain our frontend file which is served on web.
DTL (Django template language) / ginger templates
- For using python code in html file Django uses DTL and ginger templates.
- for access admin panel we have to serve route with
localhost:8000/admin
it redirect us to admin page.
- for create new admin user we have to fire a command
python manage.py createsuperuser
.