diff options
| author | Tom Christie | 2013-12-09 09:24:10 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-12-09 09:24:10 +0000 | 
| commit | ddd17c69e7abdd70448fa0f2f2a807d600b3391d (patch) | |
| tree | bc97457158092f8e7dcc970e5308f8e8d9b63361 /rest_framework/compat.py | |
| parent | a6ca943faa42af30075e260a01d7e672f706d3fd (diff) | |
| download | django-rest-framework-ddd17c69e7abdd70448fa0f2f2a807d600b3391d.tar.bz2 | |
Fix compat issues for #1231
Diffstat (limited to 'rest_framework/compat.py')
| -rw-r--r-- | rest_framework/compat.py | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 581e29fc..05bd99e0 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -69,6 +69,13 @@ try:  except ImportError:      import urlparse +# UserDict moves in Python 3 +try: +    from UserDict import UserDict +    from UserDict import DictMixin +except ImportError: +    from collections import UserDict +    from collections import MutableMapping as DictMixin  # Try to import PIL in either of the two ways it can end up installed.  try: | 
