title: Django messages framework not working in template loop
body: <p>I recently upgraded to Django 1.3 and I want to start using the Messages system.</p>
  
  <p>I have added my Middleware, Template context processors and also messages into the <code>INSTALLED_APPS</code></p>
  
  <pre><code>MIDDLEWARE_CLASSES = (
      'django.middleware.cache.UpdateCacheMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.middleware.locale.LocaleMiddleware',
      'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.middleware.csrf.CsrfResponseMiddleware',
      'facebook.djangofb.FacebookMiddleware',
      'annoying.middlewares.RedirectMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.cache.FetchFromCacheMiddleware',
  )
  
  TEMPLATE_CONTEXT_PROCESSORS = (
      "django.core.context_processors.auth",
      "django.core.context_processors.debug",
      "django.core.context_processors.i18n",
      "django.core.context_processors.media",
      "django.core.context_processors.request",
      "django.contrib.messages.context_processors.messages",
  )
  
  INSTALLED_APPS = (
      'django.contrib.messages',
  )
  </code></pre>
  
  <p>I'm simply just testing based on a view that makes a simple calculation.</p>
  
  <p>in the admin, the messages show up, however when trying to render them in my base.html file I get the following error.</p>
  
  <pre><code>Caught TypeError while rendering: 'module' object is not iterable
  </code></pre>
  
  <p>and in the stack it fails here.</p>
  
  <pre><code>{% for message in messages %}
  </code></pre>
  
  <p>I have also removed the for statement and the I still get the following error, nothing more</p>
  
  <pre><code>&lt;module 'django.contrib.messages' from '/Users/ApPeL/.virtualenvs/mysite.com/lib/python2.7/site-packages/django/contrib/messages/__init__.py'&gt;
  </code></pre>
  
  <p>Any ideas?</p>