add utils modul
This commit is contained in:
@@ -6,6 +6,10 @@ from config import Config
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from os.path import isfile, abspath
|
from os.path import isfile, abspath
|
||||||
|
from utils import pjoin2
|
||||||
|
from utils import pjoin
|
||||||
|
|
||||||
|
|
||||||
package_directory = os.path.dirname(os.path.abspath(__file__))
|
package_directory = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
#cfg = Config(file('./config.cfg'))
|
#cfg = Config(file('./config.cfg'))
|
||||||
@@ -106,11 +110,6 @@ def get_flatpage(path):
|
|||||||
return (is_index, path, page)
|
return (is_index, path, page)
|
||||||
|
|
||||||
|
|
||||||
def pjoin (rt,pth):
|
|
||||||
return u'{}/{}'.format(rt,pth)
|
|
||||||
|
|
||||||
def pjoin2 (pth):
|
|
||||||
return u'/'.join(pth) or u''
|
|
||||||
|
|
||||||
def misskey(a,key):
|
def misskey(a,key):
|
||||||
if not a.has_key(key):
|
if not a.has_key(key):
|
||||||
|
|||||||
Reference in New Issue
Block a user