From fdb7a08f6f9bdd99449f118e20e1d38801a42fab Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Fri, 21 Sep 2012 16:47:02 -0500 Subject: reports: Update TEMPLATE_LOADERS for older versions of Django --- src/lib/Bcfg2/settings.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib/Bcfg2/settings.py b/src/lib/Bcfg2/settings.py index 9e2be5cb9..484e7f769 100644 --- a/src/lib/Bcfg2/settings.py +++ b/src/lib/Bcfg2/settings.py @@ -130,10 +130,16 @@ ADMIN_MEDIA_PREFIX = '/media/' # Make this unique, and don't share it with anybody. SECRET_KEY = 'eb5+y%oy-qx*2+62vv=gtnnxg1yig_odu0se5$h0hh#pc*lmo7' -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -) +if has_django and django.VERSION[0] == 1 and django.VERSION[1] < 3: + TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.load_template_source', + 'django.template.loaders.app_directories.load_template_source', + ) +else: + TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + ) #TODO - review these. auth and sessions aren't really used MIDDLEWARE_CLASSES = ( -- cgit v1.2.3-1-g7c22