lamost fully fixed umfold template
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
System Module Admin
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from unfold.admin import ModelAdmin
|
||||
from igny8_core.admin.base import AccountAdminMixin
|
||||
from .models import AIPrompt, IntegrationSettings, AuthorProfile, Strategy
|
||||
|
||||
@@ -15,7 +16,7 @@ try:
|
||||
from .models import SystemLog, SystemStatus
|
||||
|
||||
@admin.register(SystemLog)
|
||||
class SystemLogAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
class SystemLogAdmin(AccountAdminMixin, ModelAdmin):
|
||||
list_display = ['id', 'account', 'module', 'level', 'action', 'message', 'created_at']
|
||||
list_filter = ['module', 'level', 'created_at', 'account']
|
||||
search_fields = ['message', 'action']
|
||||
@@ -24,7 +25,7 @@ try:
|
||||
|
||||
|
||||
@admin.register(SystemStatus)
|
||||
class SystemStatusAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
class SystemStatusAdmin(AccountAdminMixin, ModelAdmin):
|
||||
list_display = ['component', 'account', 'status', 'message', 'last_check']
|
||||
list_filter = ['status', 'component', 'account']
|
||||
search_fields = ['component', 'message']
|
||||
@@ -34,7 +35,7 @@ except ImportError:
|
||||
|
||||
|
||||
@admin.register(AIPrompt)
|
||||
class AIPromptAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
class AIPromptAdmin(AccountAdminMixin, ModelAdmin):
|
||||
list_display = ['id', 'prompt_type', 'account', 'is_active', 'updated_at']
|
||||
list_filter = ['prompt_type', 'is_active', 'account']
|
||||
search_fields = ['prompt_type']
|
||||
@@ -63,7 +64,7 @@ class AIPromptAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
|
||||
|
||||
@admin.register(IntegrationSettings)
|
||||
class IntegrationSettingsAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
class IntegrationSettingsAdmin(AccountAdminMixin, ModelAdmin):
|
||||
list_display = ['id', 'integration_type', 'account', 'is_active', 'updated_at']
|
||||
list_filter = ['integration_type', 'is_active', 'account']
|
||||
search_fields = ['integration_type']
|
||||
@@ -99,7 +100,7 @@ class IntegrationSettingsAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
|
||||
|
||||
@admin.register(AuthorProfile)
|
||||
class AuthorProfileAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
class AuthorProfileAdmin(AccountAdminMixin, ModelAdmin):
|
||||
list_display = ['name', 'account', 'tone', 'language', 'is_active', 'created_at']
|
||||
list_filter = ['is_active', 'tone', 'language', 'account']
|
||||
search_fields = ['name', 'description', 'tone']
|
||||
@@ -128,7 +129,7 @@ class AuthorProfileAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
|
||||
|
||||
@admin.register(Strategy)
|
||||
class StrategyAdmin(AccountAdminMixin, admin.ModelAdmin):
|
||||
class StrategyAdmin(AccountAdminMixin, ModelAdmin):
|
||||
list_display = ['name', 'account', 'sector', 'is_active', 'created_at']
|
||||
list_filter = ['is_active', 'account']
|
||||
search_fields = ['name', 'description']
|
||||
|
||||
Reference in New Issue
Block a user