summaryrefslogtreecommitdiff
path: root/cgi-bin/path.py
blob: eae54457f0af60a9c4a5a9dfe63f35483aefc5e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- coding: utf-8 -*-
import config
from config import Config

root = Config.get("route", "url")
imgsDir = Config.get("route", "images")
templDir = Config.get("route", "templates")

class Path(object):
    # 拼接url
    def url(path):
        return root + path 

    # 保存的图片路径
    def img(imgFile):
        return root + imgsDir + imgFile
    
    # html模板路径
    def template(templ):
        return templDir + templ