I am getting ACCOUNT_ACTIVATION_DAYS from an envvar via getenv and forgot to cast as an int before assignment. That left me with a very cryptic error message - '>' not supported between instances of 'float' and 'str' - in django/core/signing.py. signing.loads requires an int (or at least a number) and * int in python on a string will repeat that string int times rather than complain... Leading to the error. The relevant code in django-registration is:
Simply wrapping an int around settings.ACCOUNT_ACTIVATION_DAYS would make for a super-easy "fix", in the sense that it's documented and int is pretty sensible (IMHO). Would you be interested in a PR? What would that PR need to look like? (I won't have time for lots of tests for a few weeks).
I am getting
ACCOUNT_ACTIVATION_DAYS
from an envvar viagetenv
and forgot to cast as anint
before assignment. That left me with a very cryptic error message -'>' not supported between instances of 'float' and 'str'
- indjango/core/signing.py
.signing.loads
requires anint
(or at least a number) and* int
in python on a string will repeat that stringint
times rather than complain... Leading to the error. The relevant code indjango-registration
is:Simply wrapping an
int
aroundsettings.ACCOUNT_ACTIVATION_DAYS
would make for a super-easy "fix", in the sense that it's documented andint
is pretty sensible (IMHO). Would you be interested in a PR? What would that PR need to look like? (I won't have time for lots of tests for a few weeks).