add south migrations, convert update to python

This commit is contained in:
j 2012-11-02 13:41:41 +01:00
commit 2c07dedac0
46 changed files with 2729 additions and 48 deletions

View file

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from django.core.management.base import BaseCommand
from django.db import connection, transaction
class Command(BaseCommand):
"""
"""
help = 'check if south migrations are initialized'
args = ''
def handle(self, **options):
try:
import south.models
table_name = south.models.MigrationHistory._meta.db_table
cursor = connection.cursor()
db_rows = connection.introspection.get_table_description(cursor, table_name)
print "yes"
except:
print "no"