1 |
commit: 7f9568e9554cf7d174535eceff778a40aa499cd0 |
2 |
Author: Max Magorsch <arzano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 3 22:53:06 2020 +0000 |
4 |
Commit: Max Magorsch <arzano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 3 22:53:06 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-mirrorstats.git/commit/?id=7f9568e9 |
7 |
|
8 |
Use absolute path for the html template folder |
9 |
|
10 |
Signed-off-by: Max Magorsch <arzano <AT> gentoo.org> |
11 |
|
12 |
html/generate.py | 5 ++--- |
13 |
1 file changed, 2 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/html/generate.py b/html/generate.py |
16 |
index d6f21c0..33a3cd5 100755 |
17 |
--- a/html/generate.py |
18 |
+++ b/html/generate.py |
19 |
@@ -20,6 +20,7 @@ import xml.etree.ElementTree as ET |
20 |
import jinja2 |
21 |
|
22 |
html_folder = "/var/www/mirrorstats.gentoo.org/htdocs/" |
23 |
+template_folder = "/var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/html/" |
24 |
cache_path = "/var/www/mirrorstats.gentoo.org/var/html_data_cache.json" |
25 |
|
26 |
|
27 |
@@ -147,7 +148,7 @@ def getHostList(mirrorstatsList): |
28 |
# |
29 |
# render jinja2 |
30 |
# |
31 |
-templateLoader = jinja2.FileSystemLoader(searchpath="./") |
32 |
+templateLoader = jinja2.FileSystemLoader(searchpath=template_folder) |
33 |
templateEnv = jinja2.Environment(loader=templateLoader) |
34 |
|
35 |
## stats |
36 |
@@ -174,5 +175,3 @@ with open(cache_path, 'w') as fp: |
37 |
# finish |
38 |
# |
39 |
print("Finished.") |
40 |
- |
41 |
- |