1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, 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 django.utils.translation import ugettext_lazy as _
8 from social.models import Cite
11 class CiteAdmin(admin.ModelAdmin):
12 list_display = ['text', 'sticky', 'vip', 'small', 'has_image']
14 (None, {'fields': ('book', 'text', 'small', 'vip', 'link', 'sticky')}),
17 {'fields': ('image', 'image_title', 'image_author',
18 'image_link', 'image_license', 'image_license_link')
23 def has_image(self, cite):
24 return bool(cite.image)
25 has_image.description = _('image')
26 has_image.boolean = True
29 admin.site.register(Cite, CiteAdmin)