Skip to content

Instantly share code, notes, and snippets.

@padurets
Last active November 10, 2017 15:43
Show Gist options
  • Save padurets/3d3430cb3fb8510e4efb6278c69eb112 to your computer and use it in GitHub Desktop.
Save padurets/3d3430cb3fb8510e4efb6278c69eb112 to your computer and use it in GitHub Desktop.
reset django project
rm -rf python/
virtualenv --python=python3.5 python
source python/bin/activate
cd repo/dev
pip install -r requirements.txt
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc" -delete
dropdb -h localhost -p 5432 -U sharry sharry
createdb -h localhost -p 5432 -O sharry sharry
python manage.py makemigrations
python manage.py migrate
echo '\nCreate superuser:\n'
python manage.py createsuperuser
python manage.py runserver 127.0.0.1:8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment