Skip to content

Commit

Permalink
feat(calendar): add admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
injoonH committed Jan 3, 2024
1 parent fd79b14 commit d9ef2ee
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion apps/calendar/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
from django.contrib import admin

# Register your models here.
from ara.classes.admin import MetaDataModelAdmin

from .models import Event, Tag


@admin.register(Event)
class EventAdmin(MetaDataModelAdmin):
list_display = (
"ko_title",
"en_title",
"is_all_day",
"start_at",
"end_at",
"location",
"url",
)
fields = (
("ko_title", "ko_description"),
("en_title", "en_description"),
("start_at", "end_at"),
"is_all_day",
"location",
"url",
"tags",
)
filter_horizontal = ("tags",)


@admin.register(Tag)
class TagAdmin(admin.ModelAdmin):
list_display = (
"colored_ko_name",
"en_name",
"color",
)

0 comments on commit d9ef2ee

Please sign in to comment.