diff --git a/ietf/doc/admin.py b/ietf/doc/admin.py index 3ad4bee2af..301d32d7cc 100644 --- a/ietf/doc/admin.py +++ b/ietf/doc/admin.py @@ -142,6 +142,13 @@ class DocumentActionHolderAdmin(admin.ModelAdmin): # events +class DeletedEventAdmin(admin.ModelAdmin): + list_display = ['id', 'content_type', 'json', 'by', 'time'] + list_filter = ['time'] + raw_id_fields = ['content_type', 'by'] +admin.site.register(DeletedEvent, DeletedEventAdmin) + + class DocEventAdmin(admin.ModelAdmin): def event_type(self, obj): return str(obj.type) @@ -159,39 +166,42 @@ def short_desc(self, obj): admin.site.register(StateDocEvent, DocEventAdmin) admin.site.register(ConsensusDocEvent, DocEventAdmin) admin.site.register(BallotDocEvent, DocEventAdmin) +admin.site.register(IRSGBallotDocEvent, DocEventAdmin) admin.site.register(WriteupDocEvent, DocEventAdmin) admin.site.register(LastCallDocEvent, DocEventAdmin) admin.site.register(TelechatDocEvent, DocEventAdmin) -admin.site.register(ReviewRequestDocEvent, DocEventAdmin) -admin.site.register(ReviewAssignmentDocEvent, DocEventAdmin) admin.site.register(InitialReviewDocEvent, DocEventAdmin) -admin.site.register(AddedMessageEvent, DocEventAdmin) -admin.site.register(SubmissionDocEvent, DocEventAdmin) admin.site.register(EditedAuthorsDocEvent, DocEventAdmin) admin.site.register(IanaExpertDocEvent, DocEventAdmin) -class DeletedEventAdmin(admin.ModelAdmin): - list_display = ['id', 'content_type', 'json', 'by', 'time'] - list_filter = ['time'] - raw_id_fields = ['content_type', 'by'] -admin.site.register(DeletedEvent, DeletedEventAdmin) - class BallotPositionDocEventAdmin(DocEventAdmin): - raw_id_fields = ["doc", "by", "balloter", "ballot"] + raw_id_fields = DocEventAdmin.raw_id_fields + ["balloter", "ballot"] admin.site.register(BallotPositionDocEvent, BallotPositionDocEventAdmin) - -class IRSGBallotDocEventAdmin(DocEventAdmin): - raw_id_fields = ["doc", "by"] -admin.site.register(IRSGBallotDocEvent, IRSGBallotDocEventAdmin) class BofreqEditorDocEventAdmin(DocEventAdmin): - raw_id_fields = ["doc", "by", "editors" ] + raw_id_fields = DocEventAdmin.raw_id_fields + ["editors"] admin.site.register(BofreqEditorDocEvent, BofreqEditorDocEventAdmin) class BofreqResponsibleDocEventAdmin(DocEventAdmin): - raw_id_fields = ["doc", "by", "responsible" ] + raw_id_fields = DocEventAdmin.raw_id_fields + ["responsible"] admin.site.register(BofreqResponsibleDocEvent, BofreqResponsibleDocEventAdmin) +class ReviewRequestDocEventAdmin(DocEventAdmin): + raw_id_fields = DocEventAdmin.raw_id_fields + ["review_request"] +admin.site.register(ReviewRequestDocEvent, ReviewRequestDocEventAdmin) + +class ReviewAssignmentDocEventAdmin(DocEventAdmin): + raw_id_fields = DocEventAdmin.raw_id_fields + ["review_assignment"] +admin.site.register(ReviewAssignmentDocEvent, ReviewAssignmentDocEventAdmin) + +class AddedMessageEventAdmin(DocEventAdmin): + raw_id_fields = DocEventAdmin.raw_id_fields + ["message"] +admin.site.register(AddedMessageEvent, AddedMessageEventAdmin) + +class SubmissionDocEventAdmin(DocEventAdmin): + raw_id_fields = DocEventAdmin.raw_id_fields + ["submission"] +admin.site.register(SubmissionDocEvent, SubmissionDocEventAdmin) + class DocumentUrlAdmin(admin.ModelAdmin): list_display = ['id', 'doc', 'tag', 'url', 'desc', ] search_fields = ['doc__name', 'url', ]