diff options
author | chai <chaifix@163.com> | 2018-01-31 18:27:58 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-01-31 18:27:58 +0800 |
commit | c1803a7603135e2c148d89d5e05596f5d251842a (patch) | |
tree | b5bc28928a317d348953eee24a0af58b603040b9 /cgi-bin/path.py | |
parent | dc23aa78f0cf671eac2c18ee54b23e62848fac28 (diff) |
修改
Diffstat (limited to 'cgi-bin/path.py')
-rw-r--r-- | cgi-bin/path.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cgi-bin/path.py b/cgi-bin/path.py new file mode 100644 index 0000000..ac1ed5a --- /dev/null +++ b/cgi-bin/path.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +import config +from config import Config + +root = Config.get("route", "url") +imgsDir = Config.get("route", "imgs_dir") +templDir = Config.get("route", "templ_dir") + +class Path(object): + # 拼接url + def url(path): + return root + path + + # 保存的图片路径 + def img(imgFile): + return root + imgsDir + imgFile + + # html模板路径 + def template(templ): + return templDir + templ + |