33
44from django .db import models , migrations
55from django .conf import settings
6+
7+ from oauth2_provider .settings import oauth2_settings
68import oauth2_provider .generators
79import oauth2_provider .validators
810
@@ -48,7 +50,7 @@ class Migration(migrations.Migration):
4850 ('expires' , models .DateTimeField ()),
4951 ('redirect_uri' , models .CharField (max_length = 255 )),
5052 ('scope' , models .TextField (blank = True )),
51- ('application' , models .ForeignKey (to = settings . OAUTH2_PROVIDER_APPLICATION_MODEL )),
53+ ('application' , models .ForeignKey (to = oauth2_settings . APPLICATION_MODEL )),
5254 ('user' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
5355 ],
5456 ),
@@ -58,14 +60,14 @@ class Migration(migrations.Migration):
5860 ('id' , models .AutoField (primary_key = True , verbose_name = 'ID' , auto_created = True , serialize = False )),
5961 ('token' , models .CharField (max_length = 255 , db_index = True )),
6062 ('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 )),
6264 ('user' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
6365 ],
6466 ),
6567 migrations .AddField (
6668 model_name = 'accesstoken' ,
6769 name = 'application' ,
68- field = models .ForeignKey (to = settings . OAUTH2_PROVIDER_APPLICATION_MODEL ),
70+ field = models .ForeignKey (to = oauth2_settings . APPLICATION_MODEL ),
6971 ),
7072 migrations .AddField (
7173 model_name = 'accesstoken' ,
0 commit comments