forked from ScoDoc/DocScoDoc
adaptation de la sauvegarde des fichiers logos poursuites d'études
This commit is contained in:
parent
5e461f7dd6
commit
d7e34b8ce2
@ -44,6 +44,7 @@ import unicodedata
|
|||||||
|
|
||||||
import app.scodoc.sco_utils as scu
|
import app.scodoc.sco_utils as scu
|
||||||
from app import log
|
from app import log
|
||||||
|
from app.scodoc.sco_logos import find_logo
|
||||||
|
|
||||||
PE_DEBUG = 0
|
PE_DEBUG = 0
|
||||||
|
|
||||||
@ -201,11 +202,11 @@ def add_pe_stuff_to_zip(zipfile, ziproot):
|
|||||||
add_local_file_to_zip(zipfile, ziproot, pathname, "avis/" + filename)
|
add_local_file_to_zip(zipfile, ziproot, pathname, "avis/" + filename)
|
||||||
|
|
||||||
# Logos: (add to logos/ directory in zip)
|
# Logos: (add to logos/ directory in zip)
|
||||||
logos_names = ["logo_header.jpg", "logo_footer.jpg"]
|
logos_names = ["header", "footer"]
|
||||||
for f in logos_names:
|
for name in logos_names:
|
||||||
logo = os.path.join(scu.SCODOC_LOGOS_DIR, f)
|
logo = find_logo(logoname=name, dept_id=g.scodoc_dept_id)
|
||||||
if os.path.isfile(logo):
|
if logo is not None:
|
||||||
add_local_file_to_zip(zipfile, ziproot, logo, "avis/logos/" + f)
|
add_local_file_to_zip(zipfile, ziproot, logo, "avis/logos/" + logo.filename)
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user