Closed AntonOfTheWoods closed 3 years ago
I don't think this is something that can really be fixed -- plenty of Django settings require specific non-string types, and at some point it just has to be up to the developer to work out the error when one of them is supplied as the wrong type.
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).