Advertisement
xiongtx

DJANGO_SETTINGS_MODULE error

May 16th, 2012
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1.  >>> t = template.Template('My name is {{ name }}.')
  2.     Traceback (most recent call last):
  3.       File "<stdin>", line 1, in <module>
  4.       File "/usr/lib/python2.7/site-packages/django/template/base.py", line 106, in __init__
  5.         if settings.TEMPLATE_DEBUG and origin is None:
  6.       File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__
  7.         self._setup()
  8.       File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 40, in _setup
  9.         raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
  10.     ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement