Skip to content

Commit ab981cd

Browse files
committed
extracted oauthlib version for get_system_info api
1 parent 19775ee commit ab981cd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

example/example/api_v1.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
from oauth2_provider.decorators import protected_resource
2-
from oauth2_provider import VERSION
2+
from oauth2_provider import VERSION as DOT_VERSION
33

44
import json
5-
from django.http import HttpResponse
65
from django import get_version
7-
from django.views.decorators.csrf import csrf_exempt
6+
from django.http import HttpResponse
7+
from django.http import HttpResponseBadRequest, HttpResponseNotFound
88
from django.core import serializers
9+
from django.views.decorators.csrf import csrf_exempt
910
from django.views.decorators.http import require_http_methods
10-
from django.http import HttpResponseBadRequest, HttpResponseNotFound
1111

12+
from oauthlib import __version__ as OAUTHLIB_VERSION
1213
from oauthlib.oauth2 import Server
1314

1415
from .models import MyApplication
@@ -32,8 +33,8 @@ def get_system_info(request, *args, **kwargs):
3233
A simple "read only" api endpoint, unprotected
3334
"""
3435
data = {
35-
'DOT version': VERSION,
36-
'oauthlib version': '0.5.1',
36+
'DOT version': DOT_VERSION,
37+
'oauthlib version': OAUTHLIB_VERSION,
3738
'Django version': get_version(),
3839
}
3940

0 commit comments

Comments
 (0)