This repository has been archived on 2023-09-24. You can view files and clone it, but cannot push or open issues or pull requests.
takahe/activities/admin.py

22 lines
635 B
Python
Raw Normal View History

2022-11-12 06:02:43 +01:00
from django.contrib import admin
2022-11-12 07:04:43 +01:00
from activities.models import FanOut, Post, TimelineEvent
2022-11-12 06:02:43 +01:00
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
2022-11-12 07:04:43 +01:00
list_display = ["id", "state", "author", "created"]
2022-11-12 06:02:43 +01:00
raw_id_fields = ["to", "mentions"]
@admin.register(TimelineEvent)
class TimelineEventAdmin(admin.ModelAdmin):
list_display = ["id", "identity", "created", "type"]
raw_id_fields = ["identity", "subject_post", "subject_identity"]
2022-11-12 07:04:43 +01:00
@admin.register(FanOut)
class FanOutAdmin(admin.ModelAdmin):
list_display = ["id", "state", "state_attempted", "type", "identity"]
raw_id_fields = ["identity", "subject_post"]