forked from adieyal/django-scorecard-processor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathihp_reset_production.sh
executable file
·13 lines (13 loc) · 1.52 KB
/
ihp_reset_production.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
cd `dirname $0`
cd ihp
epio django flush -a ihp_prod -- --noinput
epio django reset scorecard_processor -a ihp_prod -- --noinput
epio django createsuperuser -a ihp_prod -- --username=admin [email protected] --noinput
echo -e "from django.contrib.auth import models;u=models.User.objects.get(username='admin');u.set_password('abc123');u.save();exit()" | epio django shell -a ihp_prod
echo -e "from django.contrib.sites import models;s=models.Site.objects.get_current();s.name='IHP+Results';s.domain='survey2012.ihpresults.net';s.save();exit()" | epio django shell -a ihp_prod
../deploy_ihp.sh
epio django loaddata ihp_results/example_data.json -a ihp_prod
echo -e "from django.contrib.auth import models;from scorecard_processor.models import Entity;u=models.User.objects.create(username='[email protected]', email='[email protected]', first_name='Bradley', last_name='Whittington');u.set_password('abc123');u.entity_set.add(Entity.objects.get(abbreviation='WHO'));u.save();exit()" | epio django shell -a ihp_prod
echo -e "from django.contrib.auth import models;from scorecard_processor.models import Entity;u=models.User.objects.create(username='[email protected]', email='[email protected]', first_name='James', last_name='Fairfax');u.set_password('abc123');u.entity_set.add(Entity.objects.get(abbreviation='WHO'));u.save();exit()" | epio django shell -a ihp_prod
#echo -e "from scorecard_processor.models import ReportRun;r=ReportRun.objects.get(id=1);r.source_data={'data_series':5};r.save();exit()" | epio django shell