X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ff928e937ca4498faa2b51e9ee818499fbcc8eaf..243ac5a586da9e5abb87698306794b6cc173ded1:/src/social/admin.py?ds=inline diff --git a/src/social/admin.py b/src/social/admin.py index 6e5bf3ab5..cc1943262 100644 --- a/src/social/admin.py +++ b/src/social/admin.py @@ -4,7 +4,7 @@ from django.contrib import admin from django.forms import ModelForm from django.forms.widgets import TextInput -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from admin_ordering.admin import OrderableAdmin from social.models import Cite, BannerGroup, Carousel, CarouselItem @@ -23,6 +23,7 @@ class CiteAdmin(admin.ModelAdmin): list_filter = ['group'] readonly_fields = ['created_at'] autocomplete_fields = ['book'] + search_fields = ['text', 'link', 'picture_alt', 'picture_author', 'picture_link', 'image_title', 'image_author', 'image_link'] fieldsets = ( (None, {'fields': ('group', 'sticky', 'created_at', 'book')}), (_('Content'), {'fields': ('link', 'vip', 'text', 'small')}), @@ -69,9 +70,11 @@ admin.site.register(BannerGroup, BannerGroupAdmin) class CarouselItemInline(OrderableAdmin, admin.TabularInline): model = CarouselItem ordering_field = 'order' + autocomplete_fields = ['banner'] class CarouselAdmin(admin.ModelAdmin): + list_display = ['placement', 'priority', 'language'] inlines = [CarouselItemInline]