From 66297c4e7e4242e419a9623de6f00eb9459e0137 Mon Sep 17 00:00:00 2001 From: wanjia Date: Wed, 21 May 2025 12:04:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=9A=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/operation/admin.py | 40 ---------------------------------------- query | 1 - 2 files changed, 41 deletions(-) delete mode 100644 query diff --git a/apps/operation/admin.py b/apps/operation/admin.py index 1b3c4d6..e69de29 100644 --- a/apps/operation/admin.py +++ b/apps/operation/admin.py @@ -1,40 +0,0 @@ -from django.contrib import admin -from apps.operation.models import OperatorAccount, PlatformAccount, Video - -@admin.register(OperatorAccount) -class OperatorAccountAdmin(admin.ModelAdmin): - list_display = ('username', 'real_name', 'position', 'department', 'is_active', 'created_at') - list_filter = ('position', 'department', 'is_active') - search_fields = ('username', 'real_name', 'email', 'phone') - ordering = ('-created_at',) - -@admin.register(PlatformAccount) -class PlatformAccountAdmin(admin.ModelAdmin): - list_display = ('account_name', 'platform_name', 'get_operator_name', 'status', 'followers_count', 'created_at') - list_filter = ('platform_name', 'status') - search_fields = ('account_name', 'account_id', 'operator__real_name') - ordering = ('-created_at',) - - def get_operator_name(self, obj): - return obj.operator.real_name - - get_operator_name.short_description = '运营账号' - get_operator_name.admin_order_field = 'operator__real_name' - -@admin.register(Video) -class VideoAdmin(admin.ModelAdmin): - list_display = ('title', 'get_platform_name', 'get_account_name', 'status', 'views_count', 'created_at') - list_filter = ('status', 'platform_account__platform_name') - search_fields = ('title', 'description', 'platform_account__account_name') - ordering = ('-created_at',) - - def get_platform_name(self, obj): - return obj.platform_account.get_platform_name_display() - - def get_account_name(self, obj): - return obj.platform_account.account_name - - get_platform_name.short_description = '平台' - get_platform_name.admin_order_field = 'platform_account__platform_name' - get_account_name.short_description = '账号名称' - get_account_name.admin_order_field = 'platform_account__account_name' diff --git a/query b/query deleted file mode 100644 index 7800f0f..0000000 --- a/query +++ /dev/null @@ -1 +0,0 @@ -redis