3
3
4
4
from django .db import models , migrations
5
5
from django .conf import settings
6
+
7
+ from oauth2_provider .settings import oauth2_settings
6
8
import oauth2_provider .generators
7
9
import oauth2_provider .validators
8
10
@@ -48,7 +50,7 @@ class Migration(migrations.Migration):
48
50
('expires' , models .DateTimeField ()),
49
51
('redirect_uri' , models .CharField (max_length = 255 )),
50
52
('scope' , models .TextField (blank = True )),
51
- ('application' , models .ForeignKey (to = settings . OAUTH2_PROVIDER_APPLICATION_MODEL )),
53
+ ('application' , models .ForeignKey (to = oauth2_settings . APPLICATION_MODEL )),
52
54
('user' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
53
55
],
54
56
),
@@ -58,14 +60,14 @@ class Migration(migrations.Migration):
58
60
('id' , models .AutoField (primary_key = True , verbose_name = 'ID' , auto_created = True , serialize = False )),
59
61
('token' , models .CharField (max_length = 255 , db_index = True )),
60
62
('access_token' , models .OneToOneField (to = 'oauth2_provider.AccessToken' , related_name = 'refresh_token' )),
61
- ('application' , models .ForeignKey (to = settings . OAUTH2_PROVIDER_APPLICATION_MODEL )),
63
+ ('application' , models .ForeignKey (to = oauth2_settings . APPLICATION_MODEL )),
62
64
('user' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
63
65
],
64
66
),
65
67
migrations .AddField (
66
68
model_name = 'accesstoken' ,
67
69
name = 'application' ,
68
- field = models .ForeignKey (to = settings . OAUTH2_PROVIDER_APPLICATION_MODEL ),
70
+ field = models .ForeignKey (to = oauth2_settings . APPLICATION_MODEL ),
69
71
),
70
72
migrations .AddField (
71
73
model_name = 'accesstoken' ,
0 commit comments