Start Django Project
Activate the virtual environment (in virtual environment directory)
django-admin startproject myapp
Write “ls” then you can see myapp folder should be there. Go to the inside my app folder. There you will see myapp folder and manage.py . manage.py file for run main tasks, synchronize database and django server. Lets go the inside myapp folder.
----- settings.py ----- urls.py ----- wsgi.py ----- __init__.py
urls.py : Urls for our django applications.
wsgi.py: Web server gateway interface.
__init__.py: Make current directory as a module
setting.py: All necessary configurations will be there.
Open the settings.py and look there. There is important parameters you can edit. For example Installed Apps: If you create new application like shop, cart … you should put information there. Root Urlconf: Url configuration root path.
After install django-admin, lets make a database migration. Go to the location that contain manage.py file. Ans use command:
python manage.py migrate
After the migrate you will see the there is db.sqlite3 file.
Run the server:
python .\manage.py runserver # There will be url # Starting development server at http://127.0.0.1:8000/
After that go to the url and you will see the django homepage.