title: Django login url
body: <p>How to enable redirect user after login at personal page included <code>user.id</code>, like <a href="http://mysite/client/12" rel="nofollow noreferrer">http://mysite/client/12</a>. I added app <code>client</code>. </p>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>from django.conf.urls import url
  from . import views
  
  app_name = 'client'
  urlpatterns = [
      url(r'^(?P&lt;user_id&gt;\d+)/$', views.user_profile, name='user_profile'),    
  ]
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.shortcuts import render
  from django.contrib.auth.decorators import login_required
  
  @login_required
  def user_profile(request,user_id):
      user_id = request.user.id
      return render(request, 'client/profile.html')
  </code></pre>
  
  <p>And changed in settings.py</p>
  
  <pre><code>LOGIN_REDIRECT_URL = 'client:user_profile request.user.id'
  </code></pre>
  
  <p>Now when I click LogIn I get error </p>
  
  <pre><code>Unsafe redirect to URL with protocol 'client'
  </code></pre>
  
  <p>I think that I am not trying to solve this problem correctly.</p>