Section 2 COmpleted
This commit is contained in:
@@ -7,7 +7,8 @@ from .views import AIPromptViewSet, AuthorProfileViewSet, StrategyViewSet, syste
|
||||
from .integration_views import IntegrationSettingsViewSet
|
||||
from .settings_views import (
|
||||
SystemSettingsViewSet, AccountSettingsViewSet, UserSettingsViewSet,
|
||||
ModuleSettingsViewSet, ModuleEnableSettingsViewSet, AISettingsViewSet
|
||||
ModuleSettingsViewSet, ModuleEnableSettingsViewSet, AISettingsViewSet,
|
||||
ContentSettingsViewSet
|
||||
)
|
||||
router = DefaultRouter()
|
||||
router.register(r'prompts', AIPromptViewSet, basename='prompts')
|
||||
@@ -57,6 +58,15 @@ module_enable_viewset = ModuleEnableSettingsViewSet.as_view({
|
||||
'get': 'list',
|
||||
})
|
||||
|
||||
# Content settings viewsets for Content Generation and Publishing settings
|
||||
content_settings_detail_viewset = ContentSettingsViewSet.as_view({
|
||||
'get': 'retrieve',
|
||||
})
|
||||
|
||||
content_settings_save_viewset = ContentSettingsViewSet.as_view({
|
||||
'post': 'save_settings',
|
||||
'put': 'update',
|
||||
})
|
||||
urlpatterns = [
|
||||
# Module enable settings endpoint - MUST come before router.urls to avoid conflict
|
||||
# When /settings/modules/enable/ is called, it would match ModuleSettingsViewSet with pk='enable'
|
||||
@@ -85,5 +95,10 @@ urlpatterns = [
|
||||
path('settings/integrations/<str:pk>/save/', integration_save_viewset, name='integration-settings-save'),
|
||||
# GET: Retrieve settings - Base path comes last
|
||||
path('settings/integrations/<str:pk>/', integration_detail_viewset, name='integration-settings-detail'),
|
||||
# Content settings routes for Content Generation and Publishing
|
||||
# POST/PUT: Save content settings - must come before GET
|
||||
path('settings/content/<str:pk>/save/', content_settings_save_viewset, name='content-settings-save'),
|
||||
# GET: Retrieve content settings
|
||||
path('settings/content/<str:pk>/', content_settings_detail_viewset, name='content-settings-detail'),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user