From 207cce213fa84b0bdd5558eef52d1d884982a8c5 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Fri, 19 Sep 2014 13:33:37 -0300 Subject: [PATCH] Exigencia explicita do settings de producao (prod.py) --- sigi/settings/__init__.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sigi/settings/__init__.py b/sigi/settings/__init__.py index ce3e479..2a722e5 100644 --- a/sigi/settings/__init__.py +++ b/sigi/settings/__init__.py @@ -1,7 +1,13 @@ try: - from .prod import * + from prod import * except ImportError: - from warnings import warn - msg = "You don't have a production settings file, using development settings." - warn(msg, category=ImportWarning) - from .dev import * + from django.core.exceptions import ImproperlyConfigured + msg = """ + + ###################################################################### + Arquivo prod.py (django settings) nao encontrado. + Se vc esta num ambiente de desenvolvimento pode cria-lo com + ln -s dev.py prod.py + ###################################################################### +""" + raise ImproperlyConfigured(msg)