-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UUID support for password reset #995
Conversation
b0782e2
to
8586a54
Compare
fixing python 2.6 ignoring of tests now (UUIDFields are not available in python2.6, so the one direction of test doesn't matter.) |
Django 1.6 (and therefore Python 2.6) are no longer supported. Why not drop it entirely from the Travis config? |
Since it seems kind of dodgy to hack around unsupported Django/Python versions in the test suite, I've opened PR #1001 |
df57441
to
15b479b
Compare
it doubled the joy :) going to squash them all down. ===== EDIT ===== this comment was about a silly rebase that doubled each of the commits, and was cleaned by squashing them |
ret = user.pk | ||
if isinstance(ret, six.integer_types): | ||
ret = int_to_base36(user.pk) | ||
return ret | ||
return str(ret) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This str() is superfluous right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. from a squashed merge before i realized that I had to return hex. will fix it.
At this point only UUID and Ints have been handled explicitly. ie, as special cases.
everything else we still need to return as a string. ie. someone really wants to use a datetime
as their user's primary key (this idea scares me though).
- Add test for utils, that skip versions of Django that do not have native UUID support. - Format in HEX, (the pretty dash versions break some regexs, like in password reset
6159e55
to
8f5c9b0
Compare
Add UUID support for password reset
Fix for #994
Basically add some tests for the uuid field serialization in the urls, and force casting to string on the user_pk_to_url_str method