- At first create you project by using following command in terminal:
django-admin startproject
[ProjectName]
- Then create a app by using following command:
python manage.py startapp
[AppName]
- Then run this following command to initialising your defualt datatable:
python manage.py makemigrations
- After that push the initialized datatable to your default django database using following command:
python manage.py migrate
- After doing above task you have to create a superuser for access your default database:
python manage.py createsuperuser\
- After running above command the following imformation you have to put:
Username (leave blank to use 'default'): [UserName]
Email Address: [[email protected]]
Password: [--------]
Password (again): [--------]
ProjectName
ProjectName
__pycache__
_init.py_
asgy.py
settings.py
urls.py
wsgi.py\
AppName
__pycache__
migrations
_init.py_
admin.py
apps.py
models.py
tests.py
views.py\
manage.py
db.sqlite3
- Now your project initialized done successfully.
- To check run the following command:
python manage.py runserver\
- After successfully run your project ready to edit.