From 3698979944b87f379eda78a9da80c4ce3d1bbda3 Mon Sep 17 00:00:00 2001 From: ddungiii Date: Tue, 2 Jan 2024 12:49:16 +0000 Subject: [PATCH] feat(global-notice): add admin --- apps/global_notice/admin.py | 9 ++++++++- apps/global_notice/models.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/global_notice/admin.py b/apps/global_notice/admin.py index 8c38f3f3..173df46b 100644 --- a/apps/global_notice/admin.py +++ b/apps/global_notice/admin.py @@ -1,3 +1,10 @@ from django.contrib import admin -# Register your models here. +from apps.global_notice.models import GlobalNotice +from ara.classes.admin import MetaDataModelAdmin + + +@admin.register(GlobalNotice) +class FAQAdmin(MetaDataModelAdmin): + list_display = ("title", "content", "started_at", "expired_at") + search_fields = ("title", "content") diff --git a/apps/global_notice/models.py b/apps/global_notice/models.py index 1a8cbe2d..0e011f4f 100644 --- a/apps/global_notice/models.py +++ b/apps/global_notice/models.py @@ -6,6 +6,7 @@ class GlobalNotice(MetaDataModel): class Meta(MetaDataModel.Meta): verbose_name = "글로벌 공지" + verbose_name_plural = "글로벌 공지 목록" title = models.CharField(verbose_name="제목", max_length=256) content = models.TextField(verbose_name="본문")