pinax / pinax-stripe-light

a payments Django app for Stripe
MIT License
684 stars 285 forks source link

update to import unicode_support from six #641

Closed ajeema closed 2 years ago

ajeema commented 4 years ago

Same issue discussed for pinax-blog:

import error installing with django 3.0.4: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding

Issue: Django 3 has removed the django.utils.encoding.python_2_unicode_compatible() api.

Solution: update pinax/stripe/models.py:

replace: from django.utils.encoding import python_2_unicode_compatible with: from six import python_2_unicode_compatible

original comment from @dannyblaker from https://github.com/pinax/pinax-blog/issues/128

same workaround seems to work for pinax-stripe so suggesting the update.