django - How to replace 'example.com' with my IP for the reset password link -
i using django inbuilt auth urls , views user login/logout/passwordreset/
namely, in urlpatterns
url(r'^accounts/', include('django.contrib.auth.urls')),
in views.py
from django.contrib.auth.views import *
after enter email address resetting password, receive email link reset password, link similar http://example.com/accounts/reset/s-3is-7535266db5af311b2a02/
and after manually change 'example.com' ip address(as running server on localhost), change password login new password.
i have read django auth codes , understand if no override given, take domain of current site , set as'domain' in passwordresetform
what supposed make link works fine after click on link direct django url change passwor.
(i thinking of override django's induilt passwordresetform in https://github.com/django/django/blob/master/django/contrib/auth/forms.py thing think need change 'domain_override=none' still have keep whole save function code. not best way)
thank helping suggesting other ways solve problem.
the default domain in sites
framework called example.com
. you'd have change that.
Comments
Post a Comment