Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6738395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:21:49+00:00 2026-05-26T11:21:49+00:00

I have a URL handler for changing passwords, such as this: url(r’^password/change/$’, auth_views.password_change, {‘template_name’

  • 0

I have a URL handler for changing passwords, such as this:

                       url(r'^password/change/$',
                           auth_views.password_change,
                           {'template_name' : 'account/password/password_change_form.html'},
                           name='auth_password_change'),

All is good, and my template is loaded, and password changing works as expected. However, my template needs to access request.user. The request object is not passed by default to the template from the built-in the auth_views.password_change view.

I know that the auth_views.password_change view can be passed in extra context, which it will pass along to the template. I just do not know how to do it in my URL handler.

I know that I could just write another view which wraps around auth_views.password_change, but I am curious if there is a shortcut way to do it from within the URL handler.

Can you show me how to modify my current URL handler to pass in the current request object as extra_context to the auth_views.password_change view?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:21:49+00:00Added an answer on May 26, 2026 at 11:21 am

    Normally you do that in the urlconf – but you can’t pass request.user in extra_context, because the urls.py has no access to the request.

    But password_change, like all built-in views, uses RequestContext to render the template – which means that there is a user object there automatically (passed in by django.contrib.auth.context_processors.auth, unless you’ve removed it from the CONTEXT_PROCESSORS list in settings.py).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a URL encoded resource such as: http://myurl/users/Joe%20Bloggs/index.xml This is for a RESTful
I have URL scheme for my blog like this: http://www.example.com/%YEAR%/%MONTH%/%CATEGORY%/%POST_TITLE%/ Now i want to
I have URL like this: http://localhost/PMApp/temp.htm?ProjectID=462 What I need to do is to get
I have a url string like this: http://www.google.com/cse?cx=017840637368510444960:ny1lmky7r-0&client=google-csbe&output=xml_no_dtd&q=simon+g I need to send this url
I have found this code in two posts here: String url = content://sms/; Uri
I'm writting custom handler interceptor in order to have multilangual url addresses. For example,
I have the following code to download a URL through a proxy: proxy_handler =
I have URL like: http://example.com#something , how do I remove #something , without causing
I have url http://www.domain.com/folder/?variable=1 i would like to do a mod redirect to index.cfm
Is it possible in CakePHP to have URL aliases in routes.php? Or by what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.