#32349: unable to obtain auth template password_reset_done when using namespaced
urls
---------------------------------+---------------------------------------
     Reporter:  James Miller     |                    Owner:  jhabarsingh
         Type:  Bug              |                   Status:  closed
    Component:  Template system  |                  Version:  3.1
     Severity:  Normal           |               Resolution:  invalid
     Keywords:  password_reset   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+---------------------------------------

Comment (by James Miller):

 Ok,  so the first thing that I have tried is to add a 'namespace'
 attribute and then match the password path in my urls.py and pass in a
 namespace.

 Although this works fine, I might as well simply pass in a modified
 success_url.

 The problem arises when the PasswordResetConfirmView is called, as I
 cannot match the path to it in the urls.py, since the request is called
 from a link in an external email.   If I try and match the path in my
 urls.py where the path to be matched is
 'http://127.0.0.1:8000/users/accounts/reset/Mg/set-password/' I get an
 exception error.

 If I don't match it and I have a namespace defined for my urls, then I
 get:
 {{{
 NoReverseMatch at /users/accounts/reset/Mg/set-password/

 Reverse for 'password_reset_complete' not found. 'password_reset_complete'
 is not a valid view function or pattern name.
 }}}

 So, because I am unable to match the path and pass in a custom
 success_url, or some other attribute, I am left with the suggestion that I
 was correct last night, and that rather than pass in a custom success_url
 to handle a namespaced auth app, the code itself should cope with custom
 namespaces.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32349#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.1d0017b4957e20a6995e43538a55068d%40djangoproject.com.

Reply via email to