I am implementing reset page for my django application. Everything works fine if i use auth_views.PasswordResetView.as_view() without passing in template_name. It uses default django provided templates and i get confirmation email and password is successfully reset but i want to pass in my own template to do so which has simple form with an image and one input tag for email. The view shows up fine but when i click submit it only shows 1 post request in console.
I have tried implementing registration directory since in source code it uses that but no luck so far. I have also changed input to a button for submitting. I tried removing extra styling classes for css too.
I am using following path for reset page.
path('login/password-reset/',
auth_views.PasswordResetView.as_view(),
name = 'password_reset' ),
Passing following generated the view but when i submit the email it doesnt get me to reset_done.
path('login/password-reset/',
auth_views.PasswordResetView.as_view(template_name = 'login/password_reset_form.html'),
name = 'password_reset' ),
Rest of my urls are as follows:
path('login/password-reset/done',
auth_views.PasswordResetDoneView.as_view(),
name = 'password_reset_done' ),
path('login/password-reset-confirm/<uidb64>/<token>/',
auth_views.PasswordResetConfirmView.as_view(),
name = 'password_reset_confirm' ),
path('login/password-reset-complete/',
auth_views.PasswordResetCompleteView.as_view(),
name='password_reset_complete'),
template is here:
<form method="POST" class="register-form" id="login-form" action= '' >
{% csrf_token %}
<div class="form-group">
<label for="your_name">Enter registered email</label>
<input type="text" name="your_name" id="your_name" placeholder="Email"/>
</div>
<div class="form-group">
<input type="submit" name="signin" id="signin" class="form-submit" value="Reset"/>
</div>
</form>
Any help would be appreciated!