costapy/config/directory.py

32 lines
623 B
Python
Raw Normal View History

2022-03-16 11:06:52 +07:00
import os
2023-12-15 16:58:00 +07:00
# template import
import templates.basic_bootstrap.main as basic_bootstrap
# 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' ,
},
}
2023-12-15 16:58:00 +07:00
def add(template):
for row in template:
dirconfig[ row['name'] ] = row['value']
# template staticdir
add(basic_bootstrap.static)