Experimental - Web development using Django framework
-
Create virtual environment
python3 -m venv django-env
-
Activate virtual environment
source django-env/bin/activate
-
Install requirement
pip install -r requirement.txt
-
Create Django Project
django-admin startproject <PROJECT_NAME>
-
Run Django application (webserver)
python manage.py runserver (default port 8000)
python manage.py runserver 8001 (run at port 8001) -
Create Django apps
stop webserver (CTR-C)
python manage.py startapp
Configure into INSTALL_APP in setting.py (in Django admin Project folder)
Create urls.py in folder
Configure path into URLPATTERN in urls.py (in Django admin project folder) -
Create default Session table.
python manage.py migrate (in Django admin project root folder)