Commit 7c6f280 Drop support for THEME_TEMPLATE_FOLDER

1 file Authored and Committed by pingou 7 days ago
Drop support for THEME_TEMPLATE_FOLDER

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

    
 1 @@ -78,21 +78,6 @@
 2           # request.
 3           app.before_request(perfrepo.reset_stats)
 4   
 5 -     if pagure_config.get('THEME_TEMPLATE_FOLDER', False):
 6 -         # Jinja can be told to look for templates in different folders
 7 -         # That's what we do here
 8 -         template_folder = pagure_config['THEME_TEMPLATE_FOLDER']
 9 -         if template_folder[0] != '/':
10 -             template_folder = os.path.join(
11 -                 app.root_path, app.template_folder, template_folder)
12 -         import jinja2
13 -         # Jinja looks for the template in the order of the folders specified
14 -         templ_loaders = [
15 -             jinja2.FileSystemLoader(template_folder),
16 -             app.jinja_loader,
17 -         ]
18 -         app.jinja_loader = jinja2.ChoiceLoader(templ_loaders)
19 - 
20       auth = pagure_config.get('PAGURE_AUTH', None)
21       if auth in ['fas', 'openid']:
22           # Only import and set flask_fas_openid if it is needed