summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-08-31 20:24:08 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-08-31 21:33:07 +0200
commitb9006b325f7fd71bfe8329a5da4fb4862675b7dd (patch)
tree0062f049d35a7e24d316f42b778ef1c9bcf9873e
parente79205c422bdbf3910c5b9bb3659a0556e9d0a11 (diff)
downloadbcfg2-b9006b325f7fd71bfe8329a5da4fb4862675b7dd.tar.gz
bcfg2-b9006b325f7fd71bfe8329a5da4fb4862675b7dd.tar.bz2
bcfg2-b9006b325f7fd71bfe8329a5da4fb4862675b7dd.zip
DBSettings: Drop support for django <1.3
-rw-r--r--debian/control4
-rw-r--r--misc/bcfg2.spec8
-rw-r--r--src/lib/Bcfg2/DBSettings.py16
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 """