Based on this 
article<http://garmoncheg.blogspot.com.au/2012/07/django-resetting-passwords-with.html>I
 implemented a password reset function.

Unfortunately, currently this only works on the development server because 
the base URLs for the post_reset_redirect are different on the production 
server.

This is the relevant part of my urls.py, I marked the prolematic parts in 
red:

    
url(r'^password/reset/$','django.contrib.auth.views.password_reset',{'post_reset_redirect'
 
: '/accounts/password/reset/done/', 'template_name': 
'accounts/password_reset.html'}, name="password_reset"),\
    
(r'^password/reset/done/$','django.contrib.auth.views.password_reset_done',{'template_name':
 
'accounts/password_reset_done.html'}), \
    
(r'^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$','django.contrib.auth.views.password_reset_confirm',{'post_reset_redirect'
 
: '/accounts/password/done/', 'template_name': 
'accounts/password_reset_confirm.html'}),\
    (r'^password/done/$', 
'django.contrib.auth.views.password_reset_complete',{'template_name': 
'accounts/password_reset_complete.html'}),
)

Normally I would use 
reverse('django.contrib.auth.views.password_reset_done') to get the correct 
URL, but using reverse() inside the urls.py leads to a configuration error, 
so how can I put the correct URLs here so it works correct both in 
development and production?

Thanks
Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/357ee849-a323-417b-b17a-79cf8e648a61%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to