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

updating Recurrence class to be py3 compatible #105

Merged
merged 1 commit into from Nov 15, 2017

Conversation

ericbuckley
Copy link
Contributor

in python 3 the __str__ method is called when converting a class to a
string (opposed to the __unicode__ method in py2). This change renames
the __unicode__ method to __str__, so we can easily get the serialized
version of a Recurrence object and while doing so maintain py2
compatibility be wrapping the class with Django's
python_2_unicode_compatible decorator

for more info see https://docs.djangoproject.com/en/1.11/topics/python3/#str-and-unicode-methods

in python 3 the __str__ method is called when converting a class to a
string (opposed to the __unicode__ method in py2).  This change renames
the __unicode__ method to __str__, so we can easily get the serialized
version of a Recurrence object and while doing so maintain py2
compatibility be wrapping the class with Djangos
python_2_unicode_compatible decorator

for more info see https://docs.djangoproject.com/en/1.11/topics/python3/#str-and-unicode-methods
@dominicrodger
Copy link
Contributor

This looks good to me - thanks @ericbuckley!

@dominicrodger dominicrodger merged commit dce6d52 into jazzband:master Nov 15, 2017
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