From 7fbe0b241b9367d2b5d2e65a00b26a9f75e67295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Mart=C3=ADn?= Date: Mon, 20 May 2013 16:28:38 +0200 Subject: [PATCH] Added Vanilla fixture for database.mod --- config/production/vanilla.json | 10 ++++++++++ fabfile.py | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 config/production/vanilla.json 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')