Skip to content
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

Merged
merged 1 commit into from
Jul 22, 2015

Conversation

yarbelk
Copy link
Contributor

@yarbelk yarbelk commented Jun 26, 2015

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

@yarbelk
Copy link
Contributor Author

yarbelk commented Jun 26, 2015

fixing python 2.6 ignoring of tests now (UUIDFields are not available in python2.6, so the one direction of test doesn't matter.)

@JshWright
Copy link
Contributor

Django 1.6 (and therefore Python 2.6) are no longer supported. Why not drop it entirely from the Travis config?

@JshWright
Copy link
Contributor

Since it seems kind of dodgy to hack around unsupported Django/Python versions in the test suite, I've opened PR #1001

@yarbelk
Copy link
Contributor Author

yarbelk commented Jul 22, 2015

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)
Copy link
Owner

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?

Copy link
Contributor Author

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
pennersr added a commit that referenced this pull request Jul 22, 2015
Add UUID support for password reset
@pennersr pennersr merged commit bf08497 into pennersr:master Jul 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants