Bash script to create django project

Linux -- Posted on Feb. 20, 2019

Bash script to create django project

              
                #!/bin/bash
if [ $# -eq 0 ]
then
    echo "No arguments supplied"
    exit 1;
else
  mkdir -p $1
  cd $1
  python3 -m venv env
  source env/bin/activate
  pip install django django-debug-toolbar django-extensions python-memcached
  mkdir public
  pip freeze > requirements.txt
  django-admin startproject $1
  cd $1
  mkdir templates static
  cd templates
  touch index.html base.html
  cd ..
  pwd
fi
                  
   
            

Related Posts