summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Admin.py')
-rw-r--r--src/lib/Bcfg2/Server/Admin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Admin.py b/src/lib/Bcfg2/Server/Admin.py
index 0eba843c7..b7ee0c0ed 100644
--- a/src/lib/Bcfg2/Server/Admin.py
+++ b/src/lib/Bcfg2/Server/Admin.py
@@ -32,7 +32,7 @@ try:
HAS_DJANGO = True
if django.VERSION[0] == 1 and django.VERSION[1] >= 7:
HAS_REPORTS = True
- elif django.VERSION[0] == 1 and django.VERSION[1] <= 6:
+ else:
try:
import south # pylint: disable=W0611
HAS_REPORTS = True
@@ -904,6 +904,9 @@ if HAS_DJANGO:
class Syncdb(AdminCmd):
""" Sync the Django ORM with the configured database """
+ if HAS_DJANGO and django.VERSION[0] == 1 and django.VERSION[1] >= 7:
+ django.setup()
+
def run(self, setup):
Bcfg2.Server.models.load_models()
try: