Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
django-tei-importer/scripts/loaddjango.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
21 lines (19 sloc)
845 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Load static files | |
python manage.py collectstatic -v0 --noinput | |
# Reset migrations for database | |
#python manage.py migrate --fake eoa zero | |
#python manage.py migrate --fake zero | |
#rm -rf eoa/migrations/* | |
#touch eoa/migrations/__init__.py | |
# Make and Migrate | |
python manage.py makemigrations eoa | |
python manage.py migrate eoa | |
yes "y" | python manage.py makemigrations | |
yes "y" | python manage.py migrate | |
# Create superuser with pwd from env variable | |
echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.filter(email='admin@example.com', is_superuser=True).delete(); User.objects.create_superuser('admin', 'admin@example.com','"$ADMIN_PWD"')" | python manage.py shell | |
# Import Bärnighausen file | |
python manage.py tei_import -f baernighausen.xml | |
# Start server | |
python manage.py runserver 0.0.0.0:8000 |