symposion_app/pinaxcon/proposals/admin.py
Joel Addison 38aebda92e Add LCA2021 Miniconfs
Setup proposal types for miniconfs at LCA2021.
2020-11-23 21:24:17 +10:00

51 lines
1.4 KiB
Python

from django.contrib import admin
from pinaxcon.proposals import models
from symposion.proposals import models as symposion_models
from symposion.reviews.models import ProposalResult
class CategoryAdmin(admin.ModelAdmin):
class AdditionalSpeakerInline(admin.TabularInline):
model = symposion_models.AdditionalSpeaker
class ProposalResultInline(admin.TabularInline):
model = ProposalResult
readonly_fields = ["score"]
fields = ["status"]
inlines = [
AdditionalSpeakerInline,
ProposalResultInline,
]
models_to_register = [
models.TalkProposal,
models.TutorialProposal,
models.MiniconfProposal,
### LCA2021 Miniconfs
models.GlamProposal,
models.KernelProposal,
models.OpenHardwareProposal,
models.SysAdminProposal,
]
for model in models_to_register:
admin.site.register(model, CategoryAdmin,
list_display = [
"id",
"title",
"speaker",
"speaker_email",
"kind",
"target_audience",
"status",
"cancelled",
],
list_filter = [
"result__status",
"cancelled",
],
)