Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit 89214b7

Browse files
committed
Fixes #150
rest_framework does not have serializers object so needs an explicit import. Added the import into the >=3.0 code only so does not affect older DRF versions if this is something new.
1 parent 8a03fc8 commit 89214b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rest_framework_jwt/compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
class PasswordField(CharField):
1010
widget = widgets.PasswordInput
1111
else:
12+
import rest_framework.serializers
1213
class Serializer(rest_framework.serializers.Serializer):
1314
@property
1415
def object(self):

0 commit comments

Comments
 (0)