From e5f72228d92e58406b43c2a772737535041d28c0 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 18 Mar 2019 13:51:27 +0100 Subject: [PATCH] More banners admin. --- src/social/admin.py | 11 ++++++-- src/social/locale/pl/LC_MESSAGES/django.mo | Bin 3014 -> 2990 bytes src/social/locale/pl/LC_MESSAGES/django.po | 26 ++++++++++-------- src/social/models.py | 4 +-- .../templates/admin/base_site.html | 2 +- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/social/admin.py b/src/social/admin.py index 258e522c0..0a634ed89 100755 --- a/src/social/admin.py +++ b/src/social/admin.py @@ -10,8 +10,9 @@ from social.models import Cite, BannerGroup, Carousel, CarouselItem class CiteAdmin(admin.ModelAdmin): list_display = ['nonempty_text', 'created_at', 'sticky', 'vip', 'small', 'has_image'] list_filter = ['group'] + readonly_fields = ['created_at'] fieldsets = ( - (None, {'fields': ('group', 'sticky')}), + (None, {'fields': ('group', 'sticky', 'created_at')}), (_('Content'), {'fields': ('book', 'text', 'small', 'vip', 'link', 'video', 'picture', 'banner')}), ( _('Background'), @@ -35,7 +36,13 @@ class CiteAdmin(admin.ModelAdmin): admin.site.register(Cite, CiteAdmin) -admin.site.register(BannerGroup) + +class BannerGroupAdmin(admin.ModelAdmin): + list_display = ['name', 'created_at'] + fields = ['name', 'created_at'] + readonly_fields = ['created_at'] + +admin.site.register(BannerGroup, BannerGroupAdmin) class CarouselItemInline(OrderableAdmin, admin.TabularInline): diff --git a/src/social/locale/pl/LC_MESSAGES/django.mo b/src/social/locale/pl/LC_MESSAGES/django.mo index 12798539632f4f06e2b6a55de9a2579ab0b26cbb..c470ca1e5bf1ebd22cab5d35cc777a5721bc33e5 100644 GIT binary patch delta 932 zcmYk*Pe_zO7{~F){inTaZLZep+NRmAfA%1?nJ6j>UOa6lK{}O~M};6k4=zZDJb8Fc zis%qQbl8M=PhK<#^yJAu7r~QWM7&D}`~H?O8s2$7Gvhe(%=6A}r`A)Y<7DK$QM#!2 zs8dyD16U66qI?LOy}^%|!$ic)!>8DfBUp_Kn8zh-!5>(IyLbl=u>sGq4XdJNcg;$c zrNP=ZfMYm}F?{D-!CLxjcoV;(HvEaKWgDoCHr?NM@D}|8yn!dEfG?28E}d6c%l;N+ zH*JtaE!cvZm_==rM=elr<3p%lg5AHKN$cO;Ylin5_hC<`h{YI~(+_7HW4wXrUq$^)tn+)7ozG4s8!m(hLI zx&JSj>yH08oElHj(}}K27Y*HFWr>(7rIEKjgFY2E+p<*sqH@$`s!9h{2TfC(g3sYx fDEe|{=GAL|E7})?VkeR6$x46TKlMiZLVWcvL%2%N delta 948 zcmYk*OGs2v9LMp$^GKT+HAicl(tOnQi7iYC$p{2NX^|Us;YuY*FbbL$1Hvo?!9XuU ziy+)sfwZ|RMX5HkZ4tCkbg3H`wFyE4zrV{-Jlu0W=N!)cpVz%#GQ~{cARSvZQU|$? zJXd1&5Vs=~q)$<^H~1MnY>1g9a1i@&1WR!d6=MY(a0kn9AFtyf*5D~NV^!SjhFQUS zs1Vzp;1E8=EBMa&0aLWsu^a;=hJ8m(P;~u2u!8nJUd3b7xWC9_Clp$E3BlD)g%-@x zR5U@Y(?h-39S$&ifZE|B40rDOM^NL&Tzdj}Y|`~Vcl|G%uQA|s^SHsdE>?e^`E8eq z0#~r?e#~ML$M7CbVGk~&7Fxt={E0f+BW%O}cpF;?rV|~+mpF{t@g_32eZ@*FVnLN( zRCw18QAhe4ui-ze!UU^Pe;q22hYHk*dav8{_d5qrS25%qM~$079(zSWXq!)R{|dA~ zhwk<*>PX+CCR#%t`{>#MYW${ae?w06BI#80k+r*?G`70>UDP+NiO*BBE>?HjQ7__e#e2(UbI)v=A~=p8#r(a*KSk4P{sfN diff --git a/src/social/locale/pl/LC_MESSAGES/django.po b/src/social/locale/pl/LC_MESSAGES/django.po index 5217cf9a6..d65d69190 100644 --- a/src/social/locale/pl/LC_MESSAGES/django.po +++ b/src/social/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-18 13:38+0100\n" +"POT-Creation-Date: 2019-03-18 13:48+0100\n" "PO-Revision-Date: 2014-01-24 10:06+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: LANGUAGE \n" @@ -19,19 +19,19 @@ msgstr "" "|| n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 1.5.4\n" -#: admin.py:15 +#: admin.py:16 msgid "Content" msgstr "Zawartość" -#: admin.py:17 +#: admin.py:18 msgid "Background" msgstr "Obraz tła" -#: admin.py:28 models.py:32 +#: admin.py:29 models.py:32 msgid "text" msgstr "tekst" -#: admin.py:32 models.py:44 +#: admin.py:33 models.py:44 msgid "image" msgstr "obraz" @@ -95,7 +95,7 @@ msgstr "przyklejony" msgid "Sticky cites will take precedense." msgstr "Przyklejone cytaty mają pierwszeństwo." -#: models.py:41 models.py:100 +#: models.py:41 models.py:60 models.py:100 msgid "banner" msgstr "banner" @@ -138,13 +138,9 @@ msgstr "adres licencji" msgid "group" msgstr "grupa" -#: models.py:60 -msgid "cite" -msgstr "cytat" - #: models.py:61 -msgid "cites" -msgstr "cytaty" +msgid "banners" +msgstr "bannery" #: models.py:87 msgid "slug" @@ -194,3 +190,9 @@ msgstr "" #: templates/social/sets_form.html:8 msgid "Remove from my shelf" msgstr "Usuń z mojej półki" + +#~ msgid "cite" +#~ msgstr "cytat" + +#~ msgid "cites" +#~ msgstr "cytaty" diff --git a/src/social/models.py b/src/social/models.py index 58f551104..588b2eb8e 100644 --- a/src/social/models.py +++ b/src/social/models.py @@ -57,8 +57,8 @@ class Cite(models.Model): class Meta: ordering = ('vip', 'text') - verbose_name = _('cite') - verbose_name_plural = _('cites') + verbose_name = _('banner') + verbose_name_plural = _('banners') def __str__(self): return u"%s: %s…" % (self.vip, self.text[:60]) diff --git a/src/wolnelektury/templates/admin/base_site.html b/src/wolnelektury/templates/admin/base_site.html index 9bd250c20..71a4be5e7 100644 --- a/src/wolnelektury/templates/admin/base_site.html +++ b/src/wolnelektury/templates/admin/base_site.html @@ -7,7 +7,7 @@

{% trans "Site administration" %} - WolneLektury.pl

promobox | - cytaty | + bannery | info | książki | tagi | -- 2.20.1