Commits

Navin Kabra committed 9b93f26 Draft

Make 'django_get_version' work with django-1.4

In django-1.5+, the version number is in django.utils.version, however
in django-1.4 and earlier the version number is in django.version.
Hence, the last commit to this file causes problems with older
versions of django.

Comments (0)

Files changed (1)

registration/__init__.py

 
 
 def get_version():
-    from django.utils.version import get_version as django_get_version
+    try:
+        from django.utils.version import get_version as django_get_version
+    except ImportError:
+        from django import get_version as django_get_version
     return django_get_version(VERSION) # pragma: no cover