asset import

This commit is contained in:
ibuler
2016-11-27 14:37:50 +08:00
parent c1c9c7b68a
commit 3aea994101
14 changed files with 210 additions and 67 deletions

View File

@@ -2,5 +2,5 @@
#
for app in users assets perms audits teminal ops;do
rm -f $app/migrations/000*
rm -f ../apps/$app/migrations/000*
done

View File

@@ -1,10 +1,17 @@
#!/bin/bash
#
python ../apps/manage.py shell << EOF
from users.models import *
generate_fake()
from assets.models import *
generate_fake()
EOF
python ../apps/manage.py dbshell << EOF
delete from django_content_type;
delete from auth_permission;
EOF
python ../apps/manage.py dumpdata > ../apps/fixtures/init.json
python ../apps/manage.py dumpdata > ../apps/fixtures/fake.json