title: Django - unsupported operand type(s) for %: 'HttpResponseRedirect' and 'unicode'
body: <p>I have login view:</p>
  
  <pre><code>def login_view(request):
      username = request.POST['username']
      password = request.POST['password']
      user = authenticate(username=username, password=password)
      if user is not None:
          if user.is_active:
              login(request, user)
              HttpResponseRedirect('/profile/%s/'%username) 
          else:
              return HttpResponse("Aktywacja konta nie została zakończona")
      else:
          return HttpResponse('invalid login')
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>url(r'^login/',
     "social.views.login_view",
     name='login_view'),
  </code></pre>
  
  <p>template:</p>
  
  <pre><code>  &lt;form method="post" action="{% url login_view %}"&gt;{% csrf_token %}
      &lt;p&gt;&lt;label for="id_username"&gt;Login:&lt;/label&gt; &lt;input id="id_username" type="text" name="username" maxlength="30" /&gt;&lt;/p&gt;
      &lt;p&gt;&lt;label for="id_password"&gt;Hasło:&lt;/label&gt; &lt;input type="password" name="password" id="id_password" /&gt;&lt;/p&gt;
      &lt;input type="submit" value="Zaloguj" /&gt;
      &lt;input type="hidden" name="next" value="" /&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>But i getting: </p>
  
  <pre><code>TypeError at /accounts/login/
  unsupported operand type(s) for %: 'HttpResponseRedirect' and 'unicode'
  </code></pre>
  
  <p>str() function do not help. All usernames could contain only ASCII characters. Does someone know how to fix this?</p>