Skip to content

Commit cdc0060

Browse files
committed
Move ext.rest_framework to contrib.rest_framework
1 parent 2f28da1 commit cdc0060

File tree

7 files changed

+5
-3
lines changed

7 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* #477: **New feature**: Add support for RFC 7662 (IntrospectTokenView, introspect scope)
55
* **Compatibility**: Django 1.10 is the new minimum required version
66
* **Compatibility**: Django 1.11 is now supported
7+
* **Backwards-incompatible**: The `oauth2_provider.ext.rest_framework` module
8+
has been moved to `oauth2_provider.contrib.rest_framework`
79
* #177: Changed `id` field on Application, AccessToken, RefreshToken and Grant to BigAutoField (bigint/bigserial)
810
* #476: Disallow empty redirect URIs
911
* Fixed bad `url` parameter in some error responses.

docs/rest-framework/getting_started.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ To do so add the following lines at the end of your `settings.py` module:
3535
3636
REST_FRAMEWORK = {
3737
'DEFAULT_AUTHENTICATION_CLASSES': (
38-
'oauth2_provider.ext.rest_framework.OAuth2Authentication',
38+
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
3939
)
4040
}
4141
@@ -55,7 +55,7 @@ Here's our project's root `urls.py` module:
5555
5656
from rest_framework import permissions, routers, serializers, viewsets
5757
58-
from oauth2_provider.ext.rest_framework import TokenHasReadWriteScope, TokenHasScope
58+
from oauth2_provider.contrib.rest_framework import TokenHasReadWriteScope, TokenHasScope
5959
6060
6161
# first we define the serializers
File renamed without changes.

tests/test_rest_framework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from rest_framework import permissions
2525
from rest_framework.views import APIView
2626
from rest_framework.test import force_authenticate, APIRequestFactory
27-
from oauth2_provider.ext.rest_framework import (
27+
from oauth2_provider.contrib.rest_framework import (
2828
IsAuthenticatedOrTokenHasScope, OAuth2Authentication, TokenHasScope,
2929
TokenHasReadWriteScope, TokenHasResourceScope
3030
)

0 commit comments

Comments
 (0)