admin: add provider admin
This commit is contained in:
15
passbook/oauth_provider/forms.py
Normal file
15
passbook/oauth_provider/forms.py
Normal file
@ -0,0 +1,15 @@
|
||||
"""passbook OAuth2 IDP Forms"""
|
||||
|
||||
from django import forms
|
||||
|
||||
from passbook.oauth_provider.models import OAuth2Provider
|
||||
|
||||
|
||||
class OAuth2ProviderForm(forms.ModelForm):
|
||||
"""OAuth2 Provider form"""
|
||||
|
||||
class Meta:
|
||||
|
||||
model = OAuth2Provider
|
||||
fields = ['name', 'user', 'redirect_uris', 'client_type',
|
||||
'authorization_grant_type', 'client_id', 'client_secret', ]
|
||||
@ -9,6 +9,8 @@ from passbook.core.models import Provider
|
||||
class OAuth2Provider(Provider, AbstractApplication):
|
||||
"""Associate an OAuth2 Application with a Product"""
|
||||
|
||||
form = 'passbook.oauth_provider.forms.OAuth2ProviderForm'
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user