Projet

Général

Profil

0002-misc-update-template-loader-for-django-2.2-compatibi.patch

Frédéric Péters, 01 avril 2020 17:39

Télécharger (1,24 ko)

Voir les différences:

Subject: [PATCH 2/4] misc: update template loader for django 2.2 compatibility
 (#41236)

 wcs/utils.py | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
wcs/utils.py
23 23

  
24 24

  
25 25
class TemplateLoader(django.template.loaders.filesystem.Loader):
26
    def get_template_sources(self, template_name, template_dirs=None):
27
        if not template_dirs:
28
            template_dirs = []
29

  
26
    def get_dirs(self):
27
        template_dirs = []
28
        if get_publisher():
30 29
            # theme set by hobo
31 30
            theme = get_publisher().get_site_option('theme', 'variables')
32 31

  
......
51 50

  
52 51
                template_dirs.append(theme_directory)
53 52

  
54
            template_dirs = tuple(template_dirs)
55

  
56
        return super(TemplateLoader, self).get_template_sources(template_name, template_dirs)
53
        return template_dirs
57
-