- Создано приложение integrations с базовой архитектурой - BaseIntegration (абстрактная модель) для всех интеграций - BaseIntegrationService (абстрактный сервисный класс) - IntegrationConfig модель для тумблеров в system_settings - Добавлена вкладка "Интеграции" в системные настройки - Заготовка UI с тумблерами для включения интеграций Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
14 lines
590 B
Python
14 lines
590 B
Python
from django.views.generic import TemplateView
|
|
from user_roles.mixins import OwnerRequiredMixin
|
|
|
|
|
|
class IntegrationsListView(OwnerRequiredMixin, TemplateView):
|
|
"""Страница настроек интеграций (доступна только владельцу)"""
|
|
template_name = "system_settings/integrations.html"
|
|
|
|
def get_context_data(self, **kwargs):
|
|
context = super().get_context_data(**kwargs)
|
|
from system_settings.models import IntegrationConfig
|
|
context['integration_choices'] = IntegrationConfig.INTEGRATION_CHOICES
|
|
return context
|