Merge pull request #158 from mmarzantowicz/feature/fix-urlib-for-django-1.4

django.utils.six supports urllib since 1.5 - we need to do imports the old way
This commit is contained in:
Iacopo Spalletti 2014-07-31 18:59:52 +02:00
commit adf4a7c104
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,5 @@
from django.conf import settings
from django.forms.fields import CharField
from django.utils.six.moves.urllib.parse import urljoin
from django.utils.translation import ugettext_lazy as _
from cms import __version__ as cms_version
@ -13,6 +12,11 @@ from .models import Text
from .utils import plugin_tags_to_user_html
from .forms import TextForm
try:
from urlparse import urljoin
except ImportError:
from urllib.parse import urljoin
class TextPlugin(CMSPluginBase):
model = Text