title: 404 Error After Adding Argument To URL Path
body: <p>Ive got a users profile page and an update_profile page.</p>
  
  <p>My projects urls.py:</p>
  
  <pre><code>re_path(r'^profile/(?P&lt;username&gt;[\w-]+)/$', include('users.urls')),
  </code></pre>
  
  <p>My users.urls:</p>
  
  <pre><code>path('', views.profile, name='profile'),
  path('update_profile', views.update_profile, name='update_profile'),
  </code></pre>
  
  <p>Prior to adding the username argument to the url both of these links were working. Since adding the username argument, I can access the profile page but the update_profile page throws a 404 error. My understanding is that if the address bar reads <code>www.site/profile/testuser/update_profile</code> the projects urls.py will strip the <code>www.site/profile/testuser/</code> and pass just <code>update_profile</code> to the profile apps urls.py, which then should match the path ive given.</p>
  
  <ol>
  <li><p>Why isnt this working?</p></li>
  <li><p>On my profile page I have a check that ensures the <code>username</code> passed in matches the logged in user (so users can only access their own profiles). I will need a similar check on the update_profile page, but currently arent passing <code>username</code> to the update profile page. How could I perform this check without passing it in a second time like <code>/profile/testuser/update_profile/testuser</code>?</p></li>
  </ol>
  
  <p>Thank you.</p>