title: How do I fix my Django ImproperlyConfigured exception?
body: <p>I've followed installations of Django using pip in a virtualenv since I'm learning Django. When the Django Book told me to type this in the Python shell,</p>
  
  <pre><code>from django import template
  t = template.Template("My name is {{ name }}.")
  </code></pre>
  
  <p>I got this exception. I don't know how to solve this.</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "django/template/base.py", line 123, in __init__
      if settings.TEMPLATE_DEBUG and origin is None:
    File "django/conf/__init__.py", line 53, in __getattr__
      self._setup(name)
    File "django/conf/__init__.py", line 46, in _setup
      % (desc, ENVIRONMENT_VARIABLE))
  django.core.exceptions.ImproperlyConfigured: Requested setting TEMPLATE_DEBUG,
  but settings are not configured. You must either define the environment variable
  DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
  </code></pre>
  
  <p>Can somebody walk me through? I'm using Mac OS X 10.8</p>