title: Django login redirect not working?
body: <p>I go to my webpage <code>http://localhost:8000/listings/post/</code>, it fails the test </p>
  
  <pre><code>@user_passes_test(lambda u: u.is_authenticated() and u.get_profile().shipper)
  </code></pre>
  
  <p>as expected, and redirects me to <code>http://localhost:8000/login/?next=/listings/post/</code> like it's supposed to, but when I log in again, it doesn't redirect me back to that page like it's supposed to. It takes me to <code>/accounts/profile/</code>. I haven't defined <code>redirect_field_name</code> anywhere, so it should be looking for the default <code>next</code> variable. The relevant <code>urls.py</code> bit looks like this</p>
  
  <pre><code>url(r'^login/$', 'django.contrib.auth.views.login', name='login'),
  </code></pre>
  
  <p>So what are the possible causes for this?</p>