jumpserver/utils/export_fake_data.sh

18 lines
328 B
Bash
Raw Normal View History

2016-11-25 14:45:47 +00:00
#!/bin/bash
#
python ../apps/manage.py shell << EOF
2017-01-07 14:34:12 +00:00
from users.models.utils import *
2016-11-27 06:37:50 +00:00
generate_fake()
2017-01-07 14:34:12 +00:00
from assets.models.utils import *
2016-11-27 06:37:50 +00:00
generate_fake()
EOF
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
python ../apps/manage.py dumpdata > ../apps/fixtures/fake.json