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 8476605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:13:32+00:00 2026-06-10T18:13:32+00:00

Is there way to create just one page for login and reset password? I

  • 0

Is there way to create just one page for login and reset password?

I tried to create two forms page with following code in template:

<form action="" method="post" id="formLoginIndex">
{% csrf_token %}
<div id="elogin">
    <p><label for="id_username">Login</label>
       {{ form.username }}</p>
    <p><label for="id_password">Пароль</label>
       {{ form.password }}</p>
</div>
    <p class="submit">
        <button type="submit" class="enter">Enter</button>
        {% if next %}
        <input type="hidden" name="next" value="{{ next }}" />
        {% else %}
        <input type="hidden" name="next" value="/electricity/" />
        {% endif %} 
        <button class="forgot" type="button" onclick="$('#forgotten').toggle('normal');">Forgot password?</button>
    </p>
</form>
<div id="forgotten"> 
    <form action="/reset/done/" method="post" id="formForgot">
    {% csrf_token %}
            <p>
            <label for="id_username_forgot">Login</label>
            <input id="id_username_forgot" type="text" name="username" maxlength="30" />
            </p>
            <p>
            <label for="id_email">e-mail</label>
            <input id="id_email" type="text" name="email" maxlength="40" />
            </p>
            <p class="submit">
            <button class="remember" type="submit">Reset</button>
            </p>
    </form>
</div>

And urls :

url(r'^login/$', 'django.contrib.auth.views.login'),
url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_done'),

However works only login feature. Reset doesn’t work. Obviously is that I’m just doing smth wrong.

So should I load somehow views.password_reset into the same page or even rewrite django in auth views or there is another common solution?

  • 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-06-10T18:13:34+00:00Added an answer on June 10, 2026 at 6:13 pm

    The point is that you need a form to show the PasswordResetForm and it’s action should be set to point to reset/
    when this form is submitted via method POST, it’s redirected to where the argument post_change_redirect points to, and there you can show the user that the password has been changed.
    ( In case the form evaluates to be correct , else, it would re-render the form with errors shown )

    url(r'^reset/$', password_reset, 
            {'template_name':'your_template',   
          'post_change_redirect':'/reset/done/', 
            'extra_context':{'argument':'to tempate'}}, name='some_name'),
    url(r'^reset/done/', password_reset_done,   
            {'template_name':'the template to show a success message', 
            'extra_context':{'message':'your password is changed successfully'}},),
    

    looking at the defaults for this function ,It gives some cool info about how it works and its defaults if not given:

      password_reset  (request, is_admin_site=False,
                     template_name='registration/password_reset_form.html',
                     email_template_name='registration/password_reset_email.html',
                     subject_template_name='registration/password_reset_subject.txt',
                     password_reset_form=PasswordResetForm,
                     token_generator=default_token_generator,
                     post_reset_redirect=None,
                     from_email=None,
                     current_app=None,
                     extra_context=None)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to create a second Desktop screen in C# - just
I just wanna ask if there's a way in C#/ASP.NET to create 'dynamic' tables/fields
just wondering is there any way that I can return one value from my
I'm having this problem: I have two Google maps in one page, showing just
Is there a way to create a callback function that fires when a list
Is there a way to create a layout like the notification bar (the sliding
Is there any way to create a dynamic Pinterest button? I'm trying to add
Is there a way to create a StringBuilder from a byte[] ? I want
Is there a way to create a NuGet package where when the package is
Is there any way to create breakpoints in clojurescript? Either in the repl or

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.