Skip to content

Commit

Permalink
Fix missing basestring in Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
treyhunner committed May 25, 2013
1 parent bf9b6cc commit 02eb694
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions simple_history/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
from django.utils import importlib
from .manager import HistoryDescriptor

try:
basestring
except NameError:
basestring = str # Python 3 has no basestring

try:
from django.utils.encoding import python_2_unicode_compatible
except ImportError: # django 1.3 compatibility
Expand Down

0 comments on commit 02eb694

Please sign in to comment.