2015-10-16 17:53:02 +00:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2017-04-29 04:28:48 +00:00
|
|
|
from pinaxcon.proposals import models
|
2016-08-03 23:59:50 +00:00
|
|
|
from symposion.proposals import models as symposion_models
|
2017-09-22 06:37:36 +00:00
|
|
|
from symposion.reviews.models import ProposalResult
|
2017-09-22 02:48:09 +00:00
|
|
|
|
2016-08-03 23:59:50 +00:00
|
|
|
class CategoryAdmin(admin.ModelAdmin):
|
|
|
|
|
|
|
|
class AdditionalSpeakerInline(admin.TabularInline):
|
|
|
|
model = symposion_models.AdditionalSpeaker
|
|
|
|
|
2017-09-22 06:37:36 +00:00
|
|
|
class ProposalResultInline(admin.TabularInline):
|
|
|
|
model = ProposalResult
|
|
|
|
readonly_fields = ["score"]
|
|
|
|
fields = ["status"]
|
|
|
|
|
2016-08-03 23:59:50 +00:00
|
|
|
inlines = [
|
|
|
|
AdditionalSpeakerInline,
|
2017-09-22 06:37:36 +00:00
|
|
|
ProposalResultInline,
|
2016-08-03 23:59:50 +00:00
|
|
|
]
|
2017-09-22 06:37:36 +00:00
|
|
|
|
|
|
|
|
2019-06-24 11:52:57 +00:00
|
|
|
models_to_register = [
|
2023-04-20 07:47:34 +00:00
|
|
|
models.CopyleftComplianceProposal,
|
|
|
|
models.MemberProjectProposal,
|
|
|
|
models.ContainerDaysProposal,
|
|
|
|
models.SustainableOpenSourceBusinessProposal,
|
2023-04-21 08:39:47 +00:00
|
|
|
models.SoftwareWorkerCoopsProposal,
|
2023-04-20 07:47:34 +00:00
|
|
|
models.DiversityEquityInclusionProposal,
|
|
|
|
models.FOSSAtPlayProposal,
|
|
|
|
models.OpenSourcAIDataProposal,
|
|
|
|
models.OpenWorkProposal,
|
|
|
|
models.CommunityProposal,
|
|
|
|
models.BSDUnixProposal,
|
|
|
|
models.XMPPProposal,
|
|
|
|
models.ScienceOfCommunityProposal,
|
|
|
|
models.AArch64ARM64Proposal,
|
|
|
|
models.FOSSForEducationProposal,
|
|
|
|
models.FOSSInDailyLifeProposal,
|
2019-06-24 11:52:57 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
for model in models_to_register:
|
2017-09-22 06:37:36 +00:00
|
|
|
admin.site.register(model, CategoryAdmin,
|
|
|
|
list_display = [
|
|
|
|
"id",
|
|
|
|
"title",
|
|
|
|
"speaker",
|
|
|
|
"speaker_email",
|
|
|
|
"kind",
|
|
|
|
"target_audience",
|
|
|
|
"status",
|
|
|
|
"cancelled",
|
|
|
|
],
|
|
|
|
list_filter = [
|
|
|
|
"result__status",
|
|
|
|
"cancelled",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|