ob-vaults/Super_Vault/200_programming/python/django/project setup.md
2024-09-12 17:54:01 +03:30

940 B

status: #doc Tags: #python/django links: Date: 2024-06-22


project setup

set up virtual environment

  • make new env
python -m venv env 
  • activate env
source env/bin/activate
  • deactivate env
deactivate

virtual environment python

install django

  • insert the command
pip install django

make config project/folder

  • insert this command note that '.' mean than it go to current folder
django-admin startproject my_project .

see that when we enter this command we make folder config with manage.py file

running development server

  • insert command
python manage.py runserver
  • now open http://127.0.0.1:8080 in browser you can also hold 'Ctrl' and click on it in terminal if you see django rocket you are good to go for closing server use Ctrl + C in terminal

References