__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)"
__license__ = "AGPL v3"
from django.contrib import admin
from .models import Subsidy, SubsidyAttachment, WorkLog
[docs]class SubsidyAttachmentInline(admin.TabularInline):
model = SubsidyAttachment
[docs]class SubsidyAdmin(admin.ModelAdmin):
inlines = [
SubsidyAttachmentInline,
]
autocomplete_fields = [
"organization",
"renewal_of",
]
search_fields = [
"organization__name",
"organization__name_original",
"organization__acronym",
]
admin.site.register(Subsidy, SubsidyAdmin)
[docs]class WorkLogAdmin(admin.ModelAdmin):
autocomplete_fields = ["user"]
admin.site.register(WorkLog, WorkLogAdmin)