1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
4 from django.contrib import admin
5 from django.db.models import TextField
6 from sponsors import models
7 from sponsors import widgets
10 class SponsorAdmin(admin.ModelAdmin):
11 list_display = ('name',)
12 search_fields = ('name',)
16 class SponsorPageAdmin(admin.ModelAdmin):
17 formfield_overrides = {
18 TextField: {'widget': widgets.SponsorPageWidget},
20 list_display = ('name',)
21 search_fields = ('name',)
25 admin.site.register(models.Sponsor, SponsorAdmin)
26 admin.site.register(models.SponsorPage, SponsorPageAdmin)