CostaCoffe/config/directory.py

31 lines
645 B
Python
Raw Normal View History

2022-03-16 11:06:52 +07:00
import os
2024-01-13 12:01:14 +07:00
from core import templatestaticdir
2023-12-15 16:58:00 +07:00
# pages directory
2023-11-04 19:12:11 +07:00
page = {
'public' :'page/public' ,
'error' :'page/error' # Non-template
}
2023-12-15 16:58:00 +07:00
# public staticdir
2022-03-16 11:06:52 +07:00
dirconfig = {
'/' :
{
'tools.sessions.on' : True ,
'tools.staticdir.root' : os.path.abspath(os.getcwd()) ,
},
'/css' :
{
'tools.staticdir.on' : True ,
'tools.staticdir.dir' : './static/css' ,
},
2024-01-13 12:01:14 +07:00
'/js' :
{
'tools.staticdir.on' : True ,
'tools.staticdir.dir' : './static/js' ,
},
2022-03-16 11:06:52 +07:00
}
2023-12-15 16:58:00 +07:00
2024-01-13 12:01:14 +07:00
# template staticdir: dirconfig dirtemplate
templatestaticdir.add(dirconfig, "templates")