add module oauth
This commit is contained in:
parent
cc4a9b9b91
commit
52f28872f8
|
@ -97,4 +97,5 @@ class OrchestraMenu(Menu):
|
|||
children=process_registry(administration)
|
||||
),
|
||||
items.MenuItem("API", api_link(context)),
|
||||
items.ModelList("oauth2", ["oauth2_provider.*"]),
|
||||
]
|
||||
|
|
|
@ -16,3 +16,11 @@ class AccountConfig(AppConfig):
|
|||
accounts.register(Account, icon='Face-monkey.png')
|
||||
post_migrate.connect(create_initial_superuser,
|
||||
dispatch_uid="orchestra.contrib.accounts.management.createsuperuser")
|
||||
|
||||
# from oauth2_provider.models import Grant, AccessToken, RefreshToken, IDToken, Application
|
||||
# accounts.register(Grant, dashboard=False)
|
||||
# accounts.register(AccessToken, parent=Grant, dashboard=False)
|
||||
# accounts.register(RefreshToken, parent=Grant, dashboard=False)
|
||||
# accounts.register(IDToken, parent=Grant, dashboard=False)
|
||||
# accounts.register(Application, parent=Grant, dashboard=False)
|
||||
|
||||
|
|
|
@ -161,7 +161,8 @@ class BackendOperation(models.Model):
|
|||
return ServiceBackend.get_backend(self.backend)
|
||||
|
||||
|
||||
autodiscover_modules('backends')
|
||||
def ready(self):
|
||||
autodiscover_modules('backends')
|
||||
|
||||
|
||||
class RouteQuerySet(models.QuerySet):
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 2.2.28 on 2023-09-14 15:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('websites', '0002_auto_20230817_1149'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='websitedirective',
|
||||
name='name',
|
||||
field=models.CharField(choices=[(None, '-------'), ('HTTPD', [('redirect', 'Redirection'), ('proxy', 'Proxy'), ('error-document', 'ErrorDocumentRoot')]), ('SSL', [('ssl-ca', 'SSL CA'), ('ssl-cert', 'SSL cert'), ('ssl-key', 'SSL key')]), ('ModSecurity', [('sec-rule-remove', 'SecRuleRemoveById'), ('sec-engine', 'SecRuleEngine Off')]), ('SaaS', [('wordpress-saas', 'WordPress SaaS')])], db_index=True, max_length=128, verbose_name='name'),
|
||||
),
|
||||
]
|
|
@ -22,6 +22,8 @@ urlpatterns = [
|
|||
url(r'^api-token-auth/', obtain_auth_token, name='api-token-auth'),
|
||||
url(r'^media/(.+)/(.+)/(.+)/(.+)/(.+)$', serve_private_media, name='private-media'),
|
||||
# url(r'search', 'orchestra.views.search', name='search'),
|
||||
# OAUTH
|
||||
url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue