From 2364f88de2420bcfc381fc4ec126f8c9d2d6a015 Mon Sep 17 00:00:00 2001 From: Alexis Roda Date: Thu, 1 Sep 2016 16:59:41 +0000 Subject: [PATCH] Fix issue with 'python-django.el'. See https://github.com/fgallina/python-django.el/issues/25 for details. git-svn-id: svn://localhost/emacslib/emacslib/trunk@733 a9598837-e506-0410-a967-fbf0066ee963 --- site-lisp/python-django.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site-lisp/python-django.el b/site-lisp/python-django.el index 138dd7d..2d9a008 100644 --- a/site-lisp/python-django.el +++ b/site-lisp/python-django.el @@ -550,6 +550,13 @@ non-nil the cached value is invalidated." "from os.path import dirname, abspath\n" "stdout = sys.stdout; stderr = sys.stderr\n" "sys.stdout = sys.stderr = open(os.devnull, 'w')\n" + "if os.environ.get('DJANGO_CONFIGURATION') is not None:\n" + " try:\n" + " import configurations\n" + " configurations.setup()\n" + " except ImportError:\n" + " # fail silently\n" + " pass\n" "from django.conf import settings\n" "# Try to import json really hard\n" "try:\n"