diff options
-rw-r--r-- | debian/control | 4 | ||||
-rw-r--r-- | misc/bcfg2.spec | 8 | ||||
-rw-r--r-- | src/lib/Bcfg2/DBSettings.py | 16 |
3 files changed, 12 insertions, 16 deletions
diff --git a/debian/control b/debian/control index b9ce17520..163d14dd5 100644 --- a/debian/control +++ b/debian/control @@ -35,7 +35,7 @@ Package: bcfg2-server Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python-lxml (>= 0.9), libxml2-utils (>= 2.6.23), lsb-base (>= 3.1-9), ucf, bcfg2 (= ${binary:Version}), openssl, python (>= 2.6), python-pyinotify | python-gamin, python-daemon, python-genshi (>= 0.4.4) Recommends: graphviz, patch -Suggests: python-cheetah, python-profiler, python-django, mail-transport-agent, bcfg2-doc (= ${binary:Version}) +Suggests: python-cheetah, python-profiler, python-django (>= 1.3), mail-transport-agent, bcfg2-doc (= ${binary:Version}) Description: Configuration management server Bcfg2 is a configuration management system that generates configuration sets for clients bound by client profiles. @@ -44,7 +44,7 @@ Description: Configuration management server Package: bcfg2-web Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, bcfg2-server (= ${binary:Version}), python-django, python-django-south (>= 0.7.5) +Depends: ${python:Depends}, ${misc:Depends}, bcfg2-server (= ${binary:Version}), python-django (>= 1.3), python-django-south (>= 0.7.5) Suggests: python-mysqldb, python-psycopg2, python-sqlite, libapache2-mod-wsgi Description: Configuration management web interface Bcfg2 is a configuration management system that generates configuration sets diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec index fb2edfac6..91260c317 100644 --- a/misc/bcfg2.spec +++ b/misc/bcfg2.spec @@ -85,9 +85,9 @@ BuildRequires: mock BuildRequires: m2crypto # EPEL uses the properly-named python-django starting with EPEL7 %if 0%{?rhel} && 0%{?rhel} > 6 -BuildRequires: python-django +BuildRequires: python-django >= 1.3 %else -BuildRequires: Django +BuildRequires: Django >= 1.3 %endif BuildRequires: python-genshi BuildRequires: python-cheetah @@ -309,9 +309,9 @@ Requires: python-django-south >= 0.7 Group: System Tools # EPEL uses the properly-named python-django starting with EPEL7 %if 0%{?rhel} && 0%{?rhel} > 6 -Requires: python-django +Requires: python-django > 1.3 %else -Requires: Django >= 1.2 +Requires: Django >= 1.3 Requires: Django-south >= 0.7 %endif Requires: bcfg2-server diff --git a/src/lib/Bcfg2/DBSettings.py b/src/lib/Bcfg2/DBSettings.py index 3b5cbbbd8..6409f8b37 100644 --- a/src/lib/Bcfg2/DBSettings.py +++ b/src/lib/Bcfg2/DBSettings.py @@ -65,7 +65,12 @@ settings = dict( # pylint: disable=C0103 'django.core.context_processors.media', 'django.core.context_processors.request'), DATABASE_ROUTERS=['Bcfg2.DBSettings.PerApplicationRouter'], - TEST_RUNNER='django.test.simple.DjangoTestSuiteRunner') + TEST_RUNNER='django.test.simple.DjangoTestSuiteRunner', + CACHES={ + 'default': { + 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', + } + }) if HAS_DJANGO and django.VERSION[0] == 1 and django.VERSION[1] >= 6: settings['MIDDLEWARE_CLASSES'] += \ @@ -85,15 +90,6 @@ elif HAS_SOUTH: if 'BCFG2_LEGACY_MODELS' in os.environ: settings['INSTALLED_APPS'] += ('Bcfg2.Server.Reports.reports',) -if HAS_DJANGO and django.VERSION[0] == 1 and django.VERSION[1] < 3: - settings['CACHE_BACKEND'] = 'locmem:///' -else: - settings['CACHES'] = { - 'default': { - 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - } - } - def finalize_django_config(opts=None, silent=False): """ Perform final Django configuration """ |