Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #28 from vitaly4uk/master

python 3.3 support fix
  • Loading branch information...
commit e95cbf5f97a82f287dbd0240396cd967d6af1a35 2 parents a94190e + 2777e20
@dcramer authored
Showing with 7 additions and 3 deletions.
  1. +3 −2 uuidfield/__init__.py
  2. +4 −1 uuidfield/fields.py
View
5 uuidfield/__init__.py
@@ -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
5 uuidfield/fields.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.