X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d891cd280793404e5d44e0fe0a3d7e0c70564177..ec546ced288878c12c9977f7b2218f76c34d352f:/src/social/admin.py diff --git a/src/social/admin.py b/src/social/admin.py index 91ebcdba0..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,6 +70,7 @@ admin.site.register(BannerGroup, BannerGroupAdmin) class CarouselItemInline(OrderableAdmin, admin.TabularInline): model = CarouselItem ordering_field = 'order' + autocomplete_fields = ['banner'] class CarouselAdmin(admin.ModelAdmin):