diff --git a/config/production/vanilla.json b/config/production/vanilla.json new file mode 100644 index 0000000..66f688b --- /dev/null +++ b/config/production/vanilla.json @@ -0,0 +1,10 @@ +[ + { + "pk": 1, + "model": "database.mod", + "fields": { + "url": "http://www.minecraft.com/", + "name": "Vanilla" + } + } +] diff --git a/fabfile.py b/fabfile.py index 2f6aecd..5bd598c 100644 --- a/fabfile.py +++ b/fabfile.py @@ -137,7 +137,19 @@ def syncdb(): if not active_virtualenv(): with prefix(env.activate): local('python minecraftcodex/manage.py syncdb --noinput') + execute(migrate) + + +def fixtures(): + if not active_virtualenv(): + with prefix(env.activate): local('python minecraftcodex/manage.py loaddata ./config/development/admin.json') + local('python minecraftcodex/manage.py loaddata ./config/production/vanilla.json') + + +def migrate(): + if not active_virtualenv(): + with prefix(env.activate): local('python minecraftcodex/manage.py migrate')