Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Commit

Permalink
Support Django 1.2 and 1.3 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Jan 14, 2016
1 parent 88e1f3e commit fb9fcc8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ Use pip_ like::

.. _pip: https://pypi.python.org/pypi/pip

Note that in Django 1.2 and 1.3 requires [six](https://pythonhosted.org/six/) as well.
Install it with::

$ pip install six

Usage
-----

Expand Down
6 changes: 6 additions & 0 deletions src/permission/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ def isstr(x):
else:
def isstr(x):
return isinstance(x, basestring)

try:
from django.util import six
except ImportError:
# Django 1.2/1.3 does not have six
import six
2 changes: 1 addition & 1 deletion src/permission/utils/autodiscover.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
import copy
from django.utils import six
from permission.compat import six


def autodiscover(module_name=None):
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ deps=
django17: django>=1.7,<1.8
django18: django>=1.8,<1.9
django19: django>=1.9,<1.10
django12: six
django13: six
-rrequirements.txt
-rrequirements-test.txt
coverage
Expand Down

0 comments on commit fb9fcc8

Please sign in to comment.