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 compatibility with python3 and use uuid4 #243

Merged
merged 3 commits into from Feb 25, 2015
Merged

Conversation

bogdal
Copy link
Contributor

@bogdal bogdal commented Feb 25, 2015

This PR makes project compatible with python 3 and replaces tool for generating tokens.

@patrys
Copy link
Member

patrys commented Feb 25, 2015

Is the for loop still needed?

@bogdal
Copy link
Contributor Author

bogdal commented Feb 25, 2015

I think uuid4 is enough unique and we can get rid of these loops.

self.token = token
break
token = str(uuid4())
if not type(self).objects.filter(token=token).exists():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unique constraint will take care of that.

patrys added a commit that referenced this pull request Feb 25, 2015
Add compatibility with python3 and use uuid4
@patrys patrys merged commit 32d85df into saleor:master Feb 25, 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.

None yet

2 participants