Django basic commands

           DJANJO COMMAND ( install python first ) 

(linux code) //commented code is for window and rest python commonds are common for both

#. pip3 install pipenv                  //py -m pip install --upgrade pip
#. pipenv shell
          OR // python -m pip install django
#. pip3 install virtualenv      
#. virtualenv venv // python -m venv venv 
#. source venv/bin/activate // venv\Scripts\activate
// & c:/Users/user/Desktop/myproject/venv/Scripts/Activate.ps1

#. pip3 freeze > requirements.txt
#. pip3 install -r requirements.txt 

#. django-admin startproject myproject
#. python manage.py startapp myapp

#. pip3 install django-configurations
#. pip3 install migrations
#. python3 manage.py showmigrations //use python in place of python3 for window
#. python3 manage.py makemigrations myapp
#. python3 manage.py migrate

#. python3 manage.py createsuperuser
#. python3 manage.py runserver

#Error: That port is already in use
run this commond: killall -9 python3

Comments

Post a Comment

Popular posts from this blog

Git commands

How to Debug Android TV App using IP