Browse Source

Exigencia explicita do settings de producao (prod.py)

producao
Marcio Mazza 10 years ago
parent
commit
207cce213f
  1. 16
      sigi/settings/__init__.py

16
sigi/settings/__init__.py

@ -1,7 +1,13 @@
try: try:
from .prod import * from prod import *
except ImportError: except ImportError:
from warnings import warn from django.core.exceptions import ImproperlyConfigured
msg = "You don't have a production settings file, using development settings." msg = """
warn(msg, category=ImportWarning)
from .dev import * ######################################################################
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)

Loading…
Cancel
Save