title: ViewDoesNotExist: Tried login in module django.contrib.auth.views. Error was: 'module' object has no attribute '__file__'
body: <p>I have deployed my django app using Apache and mod_wsgi. All of the settings load fine, but when I redirect the user to the login page, I get the following error:</p>
  
  <pre><code>  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 83, in get_response
      request.path_info)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 186, in resolve
      sub_match = pattern.resolve(new_path)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 125, in resolve
      return self.callback, args, kwargs
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 137, in _get_callback
      raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e))
  
  ViewDoesNotExist: Tried login in module django.contrib.auth.views. Error was: 'module' object has no attribute '__file__'
  </code></pre>
  
  <p>With or with out the login redirect in place, I get this error when trying to load the /admin site. </p>
  
  <pre><code>  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 92, in get_response
      response = callback(request, *callback_args, **callback_kwargs)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 164, in wrapper
      return self.admin_view(view)(*args, **kwargs)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 155, in inner
      return self.login(request)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
      response = view_func(request, *args, **kwargs)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 253, in login
      return self.display_login_form(request, message)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 349, in display_login_form
      'title': _('Log in'),
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 62, in ugettext
      return real_ugettext(message)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 286, in ugettext
      return do_translate(message, 'ugettext')
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 276, in do_translate
      _default = translation(settings.LANGUAGE_CODE)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 194, in translation
      default_translation = _fetch(settings.LANGUAGE_CODE)
  
    File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 181, in _fetch
      apppath = os.path.join(os.path.dirname(app.__file__), 'locale')
  
  AttributeError: 'module' object has no attribute '__file__'
  </code></pre>
  
  <p>I have another django powered site on this same server that runs fine even in the admin site. I am stumped as to why this behavior has popped up on this site but not on the other. </p>
  
  <p>Any help would be greatly appreciated!</p>