diff --git a/markdownx/forms.py b/markdownx/forms.py index 6a7fc5b..4cd60a3 100755 --- a/markdownx/forms.py +++ b/markdownx/forms.py @@ -1,9 +1,10 @@ import os import uuid -import StringIO + from django import forms from django.conf import settings +from django.utils.six import StringIO from django.utils.translation import ugettext_lazy as _ from django.core.files.uploadedfile import InMemoryUploadedFile from django.template import defaultfilters as filters diff --git a/markdownx/widgets.py b/markdownx/widgets.py index 27115e9..907f953 100755 --- a/markdownx/widgets.py +++ b/markdownx/widgets.py @@ -9,7 +9,7 @@ from .settings import MARKDOWNX_EDITOR_RESIZABLE class MarkdownxWidget(forms.Textarea): def render(self, name, value, attrs=None): - if attrs.has_key('class'): + if 'class' in attrs.keys(): attrs['class'] += ' markdownx-editor' else: attrs.update({'class':'markdownx-editor'}) diff --git a/setup.py b/setup.py index 5f5e3fc..e6f8910 100755 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ setup( 'Topic :: Software Development :: User Interfaces', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.5', 'Programming Language :: JavaScript', ], keywords='django markdown live preview images upload',