Closed goiaba closed 4 years ago
This feature is already "kind-of" there, there is a PR for it: #58
Nice, Christian. Any idea of how long to the changes be available in a stable release?
This feature has been released on PyPi in version 1.1.0rc3.
You should be able install and test it using
pip install django-rest-passwordreset==1.1.0rc3
The
REMOTE_ADDR
value is used to set theip_address
of a new instance ofResetPasswordToken
class. Unfortunately, as state in this gunicorn issue, "... an unix socket has no remote address any more to comply with the CGI/WSGI spec.".As a consequence, the persistence of the
ResetPasswordToken
throws anNotNullViolation
exception, becauseip_address
is empty.I see that you have introduced the
DJANGO_REST_PASSWORDRESET_REMOTE_ADDR
variable in the code, but as far as I could understand, this does not solve the problem because its hard coded value (set in the settings.py) will be used as the default value whenREMOTE_ADDR
does not exists inrequest.META
.So I'm wondering if it would be a good idea to allow developer to specify the variable (s)he wants to grab from
request.META
in order to fillip_address
variable.