title: Django 1.8: AttributeError at /: 'str' object has no attribute 'copy'
body: <p>I've been trying out Django 1.8.1. So far it's been good until I tested it. When I go to the address (<code>localhost:8000</code>) where Django is serving the files, I get the error:<br>
  <code>
  AttributeError at /:
  'str' object has no attribute 'copy'
  </code></p>
  
  <p>I have one app called <code>fb_auth</code> in Django. This is the directory tree.<br>
  <code>
  /path/to/project/directory
  |
  ---.gitignore
  |
  ---project_foo
     |
     ---project_foo
     ---fb_auth
     ---templates
     ---&lt;stuff&gt;
  </code></p>
  
  <p>In the traceback, I could see this highlighted line which is from my view.
  <code>
  return render(request, 'login.html')
  </code></p>
  
  <p>Here's my <code>views.py</code>:       </p>
  
  <pre><code>from django.shortcuts import render_to_response, redirect, render    
  from django.contrib.auth import logout as auth_logout    
  from django.contrib.auth.decorators import login_required    
  
  def login(request):    
      return render(request, 'login.html')    
  
  @login_required(login_url='/')    
  def vote(request):    
      return render_to_response('vote.html')    
  
  def logout(request):     
      auth_logout(request)    
      return redirect('/')
  </code></pre>
  
  <p>Here's my <code>urls.py</code> (in case this helps):</p>
  
  <pre><code>from django.conf.urls import include, url
  from django.contrib import admin
  
  urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url('', include('social.apps.django_app.urls', namespace='social')),
      url(r'^$', 'fb_auth.views.login'),
      url(r'^vote/$', 'fb_auth.views.vote'),
      url(r'^logout/$', 'fb_auth.views.logout'),
  ]
  </code></pre>
  
  <p>Here's my <code>login.html</code>:</p>
  
  <pre><code>{% if user and not user.is_anonymous %}
      &lt;a&gt;Hello, {{ user.get_full_name }}!&lt;/a&gt;
      &lt;br&gt;
      &lt;a href="/logout"&gt;Logout&lt;/a&gt;
  {% else %}
      &lt;a href="{% url 'social:begin' 'facebook' %}?next={{ request.path }}"&gt;Login with Facebook&lt;/a&gt;
  {% endif %} 
  </code></pre>
  
  <p>This is my <code>vote.html</code> (for the moment):</p>
  
  <pre><code>&lt;h1&gt;Hello vote test&lt;/h1&gt;
  &lt;p&gt;    
      &lt;a href="/logout"&gt;Logout&lt;/a&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>And here's the traceback:</p>
  
  <pre><code>File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response    
    132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)    
  File "/home/seanballais/Code/Projects/SAElections/SAElections/fb_auth/views.py" in login    
    6.     return render(request, 'login.html')    
  File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/shortcuts.py" in render    
    67.             template_name, context, request=request, using=using)    
  File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/template/loader.py" in render_to_string    
    98.             template = get_template(template_name, using=using)    
  File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/template/loader.py" in get_template    
    29.     engines = _engine_list(using)    
  File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/template/loader.py" in _engine_list    
    144.     return engines.all() if using is None else [engines[using]]    
  File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/template/utils.py" in all    
    108.         return [self[alias] for alias in self]    
  File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/template/utils.py" in __iter__    
    105.         return iter(self.templates)    
  File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/utils/functional.py" in __get__    
    60.         res = instance.__dict__[self.name] = self.func(instance)    
  File "/home/seanballais/Code/Projects/SAElections/venv/local/lib/python3.4/site-packages/django/template/utils.py" in templates    
    54.             tpl = tpl.copy()            
  
  Exception Type: AttributeError at /    
  Exception Value: 'str' object has no attribute 'copy'    
  </code></pre>
  
  <p>EDIT: Added in my <code>urls.py</code>, and the traceback.</p>
  
  <p>I hope this helps. Any help will be appreciated. Thanks! :)</p>