2016-11-25 14:45:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
|
2017-05-11 01:43:59 +00:00
|
|
|
python ../apps/manage.py shell << EOF
|
2016-11-25 14:45:47 +00:00
|
|
|
from users.models import *
|
2017-04-04 03:37:52 +00:00
|
|
|
init_model()
|
2016-11-25 14:45:47 +00:00
|
|
|
|
|
|
|
from assets.models import *
|
2017-04-04 03:37:52 +00:00
|
|
|
init_model()
|
|
|
|
|
2016-11-25 14:45:47 +00:00
|
|
|
EOF
|
|
|
|
|
2017-05-11 01:43:59 +00:00
|
|
|
python ../apps/manage.py dbshell << EOF
|
2016-11-25 14:45:47 +00:00
|
|
|
delete from auth_permission;
|
2017-12-07 08:25:50 +00:00
|
|
|
delete from django_content_type;
|
2016-11-25 14:45:47 +00:00
|
|
|
EOF
|
|
|
|
|
2017-05-11 01:43:59 +00:00
|
|
|
python ../apps/manage.py dumpdata > ../apps/fixtures/init.json
|