title: Django: 'Module' object has no attribute '__file__'
body: <p>I'm setting up a new dev environment on a Windows box, and after successfully installing Python and django, I cloned my repository on the new machine.</p>
  
  <p>After running <code>manage.py syncdb</code> successfully, I ran <code>manage.py runserver</code>, but hitting <code>localhost:8000</code> results in the error on the title. I ran <code>django-admin.py startproject testproject</code> and ran <code>manage.py runserver</code> from there, and that project loads fine, so I think I may have ruled out my django install, but I need a next step here.</p>
  
  <p>Here is the stacktrace from my app that bombs. Any help you can give me would be appreciated.</p>
  
  <pre><code>Environment:
  
  
  Request Method: GET
  Request URL: http://localhost:8000/
  
  Django Version: 1.4.1
  Python Version: 2.7.3
  Installed Applications:
  ('django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.sites',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'django.contrib.admin',
   'api',
   'contact',
   'lessons',
   'mainsite',
   'piston',
   'registration',
   'utils')
  Installed Middleware:
  ('django.middleware.common.CommonMiddleware',
   'django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware')
  
  
  Traceback:
  File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
    111.                         response = callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\Matthew\myapp\harmonyschedules\mainsite\views.py" in index
    16.     return render_to_response('mainsite/index_redes.html', context_instance=RequestContext(request))
  File "C:\Python27\lib\site-packages\django\shortcuts\__init__.py" in render_to_response
    20.     return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
  File "C:\Python27\lib\site-packages\django\template\loader.py" in render_to_string
    169.         t = get_template(template_name)
  File "C:\Python27\lib\site-packages\django\template\loader.py" in get_template
    145.     template, origin = find_template(template_name)
  File "C:\Python27\lib\site-packages\django\template\loader.py" in find_template
    128.             loader = find_template_loader(loader_name)
  File "C:\Python27\lib\site-packages\django\template\loader.py" in find_template_loader
    95.             mod = import_module(module)
  File "C:\Python27\lib\site-packages\django\utils\importlib.py" in import_module
    35.     __import__(name)
  File "C:\Python27\lib\site-packages\django\template\loaders\app_directories.py" in &lt;module&gt;
    24.     template_dir = os.path.join(os.path.dirname(mod.__file__), 'templates')
  
  Exception Type: AttributeError at /
  Exception Value: 'module' object has no attribute '__file__'
  </code></pre>