Skip to content

Commit

Permalink
Merge pull request #28 from vitaly4uk/master
Browse files Browse the repository at this point in the history
python 3.3 support fix
  • Loading branch information
dcramer committed Feb 20, 2014
2 parents a94190e + 2777e20 commit e95cbf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions uuidfield/__init__.py
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,8 @@
from __future__ import absolute_import
try: try:
VERSION = __import__('pkg_resources') \ VERSION = __import__('pkg_resources') \
.get_distribution('django-uuidfield').version .get_distribution('django-uuidfield').version
except Exception, e: except Exception as e:
VERSION = 'unknown' VERSION = 'unknown'


from fields import UUIDField from .fields import UUIDField
5 changes: 4 additions & 1 deletion uuidfield/fields.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@


from django import forms from django import forms
from django.db.models import Field, SubfieldBase 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: try:
# psycopg2 needs us to register the uuid type # psycopg2 needs us to register the uuid type
Expand Down

0 comments on commit e95cbf5

Please sign in to comment.