2022-03-16 11:06:52 +07:00
|
|
|
import os
|
|
|
|
|
2023-06-18 15:34:09 +07:00
|
|
|
# For a static error pages
|
|
|
|
def erpadir(err):
|
|
|
|
return f'static/error/{err}.html'
|
|
|
|
|
2022-03-16 11:06:52 +07:00
|
|
|
# For templating
|
|
|
|
page = "static/page"
|
|
|
|
template = "static/template"
|
2023-05-03 23:01:57 +07:00
|
|
|
email = "static/email"
|
2022-03-16 11:06:52 +07:00
|
|
|
|
|
|
|
# For route
|
|
|
|
dirconfig = {
|
|
|
|
'/' :
|
|
|
|
{
|
|
|
|
'tools.sessions.on' : True ,
|
|
|
|
'tools.staticdir.root' : os.path.abspath(os.getcwd()) ,
|
|
|
|
},
|
|
|
|
'/lib' :
|
|
|
|
{
|
|
|
|
'tools.staticdir.on' : True ,
|
|
|
|
'tools.staticdir.dir' : './static/lib' ,
|
|
|
|
},
|
|
|
|
'/css' :
|
|
|
|
{
|
|
|
|
'tools.staticdir.on' : True ,
|
|
|
|
'tools.staticdir.dir' : './static/css' ,
|
|
|
|
},
|
|
|
|
}
|