1 # -*- coding: utf-8 -*-
2 # This file is part of django-sponsors, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from django.contrib import admin
6 from jsonfield import JSONField
7 from sponsors import models
8 from sponsors import widgets
11 class SponsorAdmin(admin.ModelAdmin):
12 list_display = ('name',)
13 search_fields = ('name',)
17 class SponsorPageAdmin(admin.ModelAdmin):
18 formfield_overrides = {
19 JSONField: {'widget': widgets.SponsorPageWidget},
21 list_display = ('name',)
22 search_fields = ('name',)
26 admin.site.register(models.Sponsor, SponsorAdmin)
27 admin.site.register(models.SponsorPage, SponsorPageAdmin)