Last active
November 17, 2022 15:10
-
-
Save jochenklar/f9ed6a1d5268ebd4c5b787383e6c96f2 to your computer and use it in GitHub Desktop.
A script to reset RDMO for development using the testing fixtures.
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 | |
RDMO=~/code/rdmorganiser/rdmo | |
python manage.py print_settings | grep -E '^DEBUG\s*=\s(True)' > /dev/null | |
[ $? -ne 0 ] && echo 'DEBUG is not True' && exit 1 | |
python manage.py check | |
[ $? -ne 0 ] && echo 'check failed' && exit 1 | |
python manage.py reset_db --noinput | |
python manage.py migrate | |
python manage.py setup_groups | |
python manage.py loaddata ../rdmo/testing/fixtures/groups.json | |
python manage.py loaddata ../rdmo/testing/fixtures/users.json | |
python manage.py loaddata ../rdmo/testing/fixtures/sites.json | |
python manage.py loaddata ../rdmo/testing/fixtures/* | |
rsync -av --delete ../rdmo/testing/media/ media_root/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment