costapy/config/directory.py
2023-12-15 16:58:00 +07:00

32 lines
623 B
Python

import os
# template import
import templates.basic_bootstrap.main as basic_bootstrap
# pages directory
page = {
'public' :'page/public' ,
'error' :'page/error' # Non-template
}
# public staticdir
dirconfig = {
'/' :
{
'tools.sessions.on' : True ,
'tools.staticdir.root' : os.path.abspath(os.getcwd()) ,
},
'/css' :
{
'tools.staticdir.on' : True ,
'tools.staticdir.dir' : './static/css' ,
},
}
def add(template):
for row in template:
dirconfig[ row['name'] ] = row['value']
# template staticdir
add(basic_bootstrap.static)