X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/2d538a50605add2666172861744229599487f1b2..5649823d030f580e26857963075af04f932c18ba:/src/depot/publishers/base.py?ds=sidebyside diff --git a/src/depot/publishers/base.py b/src/depot/publishers/base.py index b728cf24..dbf14ab7 100644 --- a/src/depot/publishers/base.py +++ b/src/depot/publishers/base.py @@ -22,9 +22,19 @@ class BasePublisher: def get_description(self, wlbook, description_add=''): description = '' + + if wlbook.meta.audience in ('L', 'SP1', 'SP2', 'SP3', 'SP4'): + description += '
{} to lektura szkolna.'.format(wlbook.meta.title)
+ if wlbook.tree.find('//pe') is not None:
+ description += '
Ebook {title} zawiera przypisy opracowane specjalnie dla uczennic i uczniów {school}.'.format(
+ title=wlbook.meta.title,
+ school='szkoÅy podstawowej' if wlbook.meta.audience.startswith('SP') else 'liceum i technikum'
+ )
+ description += '
' description += ', '.join( @@ -62,14 +72,5 @@ class BasePublisher: for p in wlbook.meta.genres ) + '
' - # TODO: Move away from using audiences for this. - if wlbook.meta.audience in ('L', 'SP1', 'SP2', 'SP3', 'SP4'): - description += '{} to lektura szkolna.'.format(wlbook.meta.title)
- if wlbook.tree.find('//pe') is not None:
- description += '
Ebook {title} zawiera przypisy opracowane specjalnie dla uczennic i uczniów {school}.'.format(
- title=wlbook.meta.title,
- school='szkoÅy podstawowej' if wlbook.meta.audience.startswith('SP') else 'liceum i technikum'
- )
- description += '