Django - Login and redirect to user profile page
<p>I am trying to redirect a user who just logged in to his/her's respective account page.</p>

<p>This question has been asked a few times, but most of them are old and use static urls like <code>/accounts/profile/</code>: <a href="https://stackoverflow.com/questions/4870619/django-after-login-redirect-user-to-his-custom-page-mysite-com-username">Django - after login, redirect user to his custom page --&gt; mysite.com/username</a>. I would like to use dynamic url naming to achieve this solution. </p>

<p>For example, what if my account landing page has the following url pattern?</p>

<pre><code>url(r'^account/(?P&lt;pk&gt;\d+)/(?P&lt;name&gt;\w+)/$', AccountLanding.as_view(), name="account-landing" )`.
</code></pre>

<p>How would I pass the args in <code>settings.py</code> for <code>LOGIN_REDIRECT_URL</code>?</p>