Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #12 from magicjohnson/master

Django 1.7 support
  • Loading branch information...
commit d3fd6bf13a466316bbbf56ca496052a7ef79e0c2 2 parents 56792e5 + c5c3f4c
@czpython czpython authored
View
1  cmsplugin_text_ng/__init__.py
@@ -1 +1,2 @@
__version__ = '0.6'
+default_app_config = 'cmsplugin_text_ng.apps.CmsPluginTextNgConfig'
View
12 cmsplugin_text_ng/apps.py
@@ -0,0 +1,12 @@
+from django.apps import AppConfig
+
+from cmsplugin_text_ng.type_registry import register_type
+
+
+class CmsPluginTextNgConfig(AppConfig):
+ name = 'cmsplugin_text_ng'
+ verbose_name = "Django Cms Plugin Text-NG"
+
+ def ready(self):
+ from cmsplugin_text_ng.models import TextNGVariableText
+ register_type('text', TextNGVariableText)
View
5 cmsplugin_text_ng/models.py
@@ -1,3 +1,5 @@
+from distutils.version import StrictVersion
+import django
from django.core.validators import RegexValidator
from django.db import models
from django.utils.translation import ugettext_lazy as _
@@ -72,4 +74,5 @@ class Meta:
verbose_name = _('text')
verbose_name_plural = _('texts')
-register_type('text', TextNGVariableText)
+if StrictVersion(django.get_version()) < StrictVersion('1.7'):
+ register_type('text', TextNGVariableText)
Please sign in to comment.
Something went wrong with that request. Please try again.