move erpadir function from server config to directory config
This commit is contained in:
parent
bee07d0323
commit
b19b814bb2
@ -1,5 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
# For a static error pages
|
||||||
|
def erpadir(err):
|
||||||
|
return f'static/error/{err}.html'
|
||||||
|
|
||||||
# For templating
|
# For templating
|
||||||
page = "static/page"
|
page = "static/page"
|
||||||
template = "static/template"
|
template = "static/template"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
def erpadir(err):
|
from config import directory
|
||||||
return f'static/error/{err}.html'
|
|
||||||
|
|
||||||
update = {
|
update = {
|
||||||
'server.socket_host' : "hostname" ,
|
'server.socket_host' : "hostname" ,
|
||||||
@ -8,7 +7,7 @@ update = {
|
|||||||
'tools.sessions.on' : True ,
|
'tools.sessions.on' : True ,
|
||||||
'engine.autoreload.on' : False ,
|
'engine.autoreload.on' : False ,
|
||||||
'request.show_tracebacks' : False ,
|
'request.show_tracebacks' : False ,
|
||||||
'error_page.403' : erpadir(403) ,
|
'error_page.403' : directory.erpadir(403) ,
|
||||||
'error_page.404' : erpadir(404) ,
|
'error_page.404' : directory.erpadir(404) ,
|
||||||
'error_page.500' : erpadir(500) ,
|
'error_page.500' : directory.erpadir(500) ,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user