diff options
| author | Eric Buehl | 2014-03-05 17:15:52 +0000 | 
|---|---|---|
| committer | Eric Buehl | 2014-03-05 17:15:52 +0000 | 
| commit | e0682e9298092721c0d3eb358ce4be8039e7ccf6 (patch) | |
| tree | b5aba5e0e80e119aa49b551a4c7875bab1d235dc /rest_framework/compat.py | |
| parent | 45ae5081f7d45438306a23a56f05a56e7681fa1e (diff) | |
| download | django-rest-framework-e0682e9298092721c0d3eb358ce4be8039e7ccf6.tar.bz2 | |
don't implicitly import provider.oauth2
Diffstat (limited to 'rest_framework/compat.py')
| -rw-r--r-- | rest_framework/compat.py | 13 | 
1 files changed, 2 insertions, 11 deletions
| diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 3089b7fb..f60a180d 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -550,13 +550,8 @@ except (ImportError, ImproperlyConfigured):  # OAuth 2 support is optional  try: -    import provider.oauth2 as oauth2_provider -    from provider.oauth2 import models as oauth2_provider_models -    from provider.oauth2 import forms as oauth2_provider_forms -    from provider import scope as oauth2_provider_scope -    from provider import constants as oauth2_constants -    from provider import __version__ as provider_version -    if provider_version in ('0.2.3', '0.2.4'): +    import provider as oauth2_provider +    if oauth2_provider.__version__ in ('0.2.3', '0.2.4'):          # 0.2.3 and 0.2.4 are supported version that do not support          # timezone aware datetimes          import datetime @@ -566,10 +561,6 @@ try:          from django.utils.timezone import now as provider_now  except ImportError:      oauth2_provider = None -    oauth2_provider_models = None -    oauth2_provider_forms = None -    oauth2_provider_scope = None -    oauth2_constants = None      provider_now = None  # Handle lazy strings | 
