Permalink
Browse files

Merge pull request #28 from vitaly4uk/master

python 3.3 support fix
  • Loading branch information...
dcramer committed Feb 20, 2014
2 parents a94190e + 2777e20 commit e95cbf5f97a82f287dbd0240396cd967d6af1a35
Showing with 7 additions and 3 deletions.
  1. +3 −2 uuidfield/__init__.py
  2. +4 −1 uuidfield/fields.py
View
@@ -1,7 +1,8 @@
+from __future__ import absolute_import
try:
VERSION = __import__('pkg_resources') \
.get_distribution('django-uuidfield').version
-except Exception, e:
+except Exception as e:
VERSION = 'unknown'
-from fields import UUIDField
+from .fields import UUIDField
View
@@ -2,7 +2,10 @@
from django import forms
from django.db.models import Field, SubfieldBase
-from django.utils.encoding import smart_unicode
+try:
+ from django.utils.encoding import smart_unicode
+except ImportError:
+ from django.utils.encoding import smart_text as smart_unicode
try:
# psycopg2 needs us to register the uuid type

0 comments on commit e95cbf5

Please sign in to comment.