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
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')}),
class CarouselItemInline(OrderableAdmin, admin.TabularInline):
model = CarouselItem
ordering_field = 'order'
+ autocomplete_fields = ['banner']
class CarouselAdmin(admin.ModelAdmin):