jonashaag / django-addanother

"Add another" buttons outside the Django admin
http://django-addanother.readthedocs.org/
ISC License
50 stars 18 forks source link

Add Django > 3.0 support #34

Closed ikcam closed 4 years ago

jonashaag commented 4 years ago

Let’s instead drop six entirely and inline the text_type definition for the single place where it’s used.

jonashaag commented 4 years ago

Thanks but that’s what I meant. text_type is different in Python 2 and Python 3.

ikcam commented 4 years ago

You mean like:

import sys

PY2 = sys.version_info[0] == 2

def text_type(value):
    return unicode(value) if PY2 else str(value)
jonashaag commented 4 years ago

Yep

jonashaag commented 4 years ago

Thank you!