Getting Started with Django

  1. Open your preferred dev tool – like vscode.
  2. Make sure python3 is installed in your machine.
  3. Create a virtual environment
    1. pip install pipenv
    2. pipenv shell
    3. pipenv install django
    4. Open the Command Palette (in the View menu)
    5. Type Python: Select Interpreter
    6. Choose the option with your virtual environment
    7. django-admin startproject PROJECTNAME
  4. cd PROJECTNAME
  5. TO RUN SERVER
    1. python manage.py runserver
    2. python manage.py migrate // adding default admin database and tables
    3. python manage.py star
    4. tapp APPNAME // to create app
  6. Add your app to setting file
  7. to INSTALLED APPS ARRAY
  8. create migration file : python manage.py makemigrations appName
  9. add models to database : python manage.py migrate
  10. create superuser for admin : python manage.py createsuperuser