It's Django Cheat Sheet
So to build this
- Install python
- Install virtual environment
pip install pipenv
- Access virtual environment shell
pipenv shell
- Install django using pipenv
pipenv install django
- Use this command to initialize django
django-admin startproject name-of-project
-
- to manage migration. Migrations are Django’s way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your database schema
-
-
-
-
- Routes file. Managing project page. It used to link the App, give some section the link, and in main directory, it used to connect url inside the app directory to main directory.
-
- urls.py
- settings.py
- manage.py
- models.py
- views.py
- admin.py
- urls.py
- apps.py
In the pipenv shell
python manage.py runserver PORT Ex: python manage.py runserver 8000
python manage.py startapp name-of-app
What’s the difference between a project and an app? An app is a web application that does something – e.g., a blog system, a database of public records or a small poll app. A project is a collection of configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects.
-
- Set of folder uses for migration
-
- the admin page. in this folder we can register our model to show it on admin page and we can peek and modified it
-
-
- the backend workfile. it manage data like option, choice, question, etc
-
- the test file. it used to make some test file so other user can sandboxing the model
-
- It manage front-end of website, the admin otherhands
- The class are used to make the section of data
- In class there is attribute that you made like question,option etc.