Fixed importing books from Django admin.
[wolnelektury.git] / apps / south / db / __init__.py
1
2 # Establish the common DatabaseOperations instance, which we call 'db'.
3 # This code somewhat lifted from django evolution
4 from django.conf import settings
5 import sys
6 module_name = ['south.db', settings.DATABASE_ENGINE]
7 try:
8     module = __import__('.'.join(module_name),{},{},[''])
9 except ImportError:
10     sys.stderr.write("There is no South database module for the engine '%s'. Please either choose a supported one, or remove South from INSTALLED_APPS.\n" % settings.DATABASE_ENGINE)
11     sys.exit(1)
12 db = module.DatabaseOperations()