Mirco
I mean into template
Mirco
The form that redirects the user to password complete
Luis
password_reset_done.html ?
Mirco
Yup
Mirco
The one that generates ReverseMatch
Manish
no action field url is passed on that
Manish
https://del.dog/wirixorike.cs
Mirco
Ook so when u click on request new password, you don't have exceptions right ?
Manish
right
Mirco
And which is the last form before ReverseMatch exception ?
Mirco
reset done ?
Manish
yeah
Mirco
And you have overwritten it ?
Manish
Luis
Do you have password_reset_done.html ?
Mirco
Exactly
Manish
Mirco
Share it pls
Manish
https://github.com/itzmanish/blog
this repo
Rajjix
Interruption: In line 22 in your urls add a slash in front of password_reset/done —->”/password_reset/done”
Manish
Interruption: In line 22 in your urls add a slash in front of password_reset/done —->”/password_reset/done”
WARNINGS:
?: (urls.W002) Your URL pattern '/password_reset/complete/' [name='password_reset_complete'] has a route beginning with a '/'. Remove this slash as it is unnecessary. If this pattern is targeted inan include(), ensure the include() pattern has a trailing '/'.
?: (urls.W002) Your URL pattern '/password_reset/done/' [name='password_reset_done'] has a route beginning with a '/'. Remove this slash as it is unnecessary. If this pattern is targeted in an include(), ensure the include() pattern has a trailing '/'.
System check identified 2 issues (0 silenced).
October 22, 2018 - 14:36:36
Django version 2.1.1, using settings 'second.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Mirco
Luis
Mirco
You have defined the template in your url but you actually don't have any file
Manish
Manish
my gosh!!
Mirco
So Django does not know what display
Mirco
😂
Manish
my useless mistake
Mirco
Try to create an even stupid password complete template and tell us if it will work
Manish
sorry i wasted alot of your times. 😭😭
Luis
Hahahah
Luis
No problem
Mirco
No worries 😂
Luis
Mirco
Manish
Mirco
yeah i removed that
👌👌
Add the template file and test the flow again
And study how to write tests for py and Django, so you can find earlier mistakes like that
Luis
Luis
Hahahahahaha
Rajjix
Luis
device*
Manish
Manish
https://screenshots.firefox.com/6omsX8Z5sO1kb7Zd/localhost
Mirco
Try to pass to password reset confirm
post_reset_redirect = reverse('profiles:password_reset_complete')
Manish
Manish
okay
Manish
i will update you guys as soon i get success with this
Mirco
Ook
Luis
Nice!
Luis
Mirco
I'll save this tip
It's inside django confirm reset pwd code
There's an if condition, if post_reset_redirect is None then Django will try with reverse('password_reset_complete')
Otherwise with that one u pass inside url pattern to that param
Rajjix
man
Luis
Oooh and the namespace was breaking the reverse function
Rajjix
go back to your old urls files
and add this
path('password_reset', auth_views.PasswordResetView.as_view(template_name='password_reset.html',
email_template_name='password_reset_email.html',
subject_template_name='password_reset_subject.txt',
success_url='/dashboard/password_reset/done/'),
Rajjix
i just cloned the project and it works fine
with this
Mirco
It's my idea, so trying to force the reverse with the namespaced url will give us the answer
Rajjix
that's what i said earlier when i told him to add a starting slash
let me check what line
Rajjix
line 18 replace it with my given line
Mirco
@maharudra108 install Django debug toolbar when debug is True , it will help you to understand lots of things
Luis
Rajjix
Rajjix
/dashboard/password_reset/done is correct
Luis
Combot
Luis López (1) has increased reputation of Mirco (8)
Mirco
Luis
Mirco
Even without specifying that success url, Django would be gone to password reset done url
Mirco
By default Django has that success url set to reverse('password_reset_done')
If I remember well the code 😂
Mirco
Rajjix
Luis
Or just following "how to" tutorial.
Mirco
Anonymous
hi i'm new member here
I created a template in Django, and initialized a very simple HTML code just to test it out with some variables loaded from the views.py file. The HTML file is loaded, but the variables are not and thanks