X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/7c8f6fe9ddb0285e0b7c80bc0ff8814304ac2f6e..ae60b2a3949e96357477cc04f90fd0873cee8a92:/apps/social/admin.py?ds=inline diff --git a/apps/social/admin.py b/apps/social/admin.py deleted file mode 100755 index bc0ac0b75..000000000 --- a/apps/social/admin.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from django.contrib import admin -from django.utils.translation import ugettext_lazy as _ - -from social.models import Cite - - -class CiteAdmin(admin.ModelAdmin): - list_display = ['text', 'sticky', 'vip', 'small', 'has_image'] - fieldsets = ( - (None, {'fields': ('book', 'text', 'small', 'vip', 'link', 'sticky')}), - ( - _('Background'), - {'fields': ('image', 'image_title', 'image_author', - 'image_link', 'image_license', 'image_license_link') - } - ) - ) - - def has_image(self, cite): - return bool(cite.image) - has_image.description = _('image') - has_image.boolean = True - - -admin.site.register(Cite, CiteAdmin)