vweb: add a `vweb_global` attribute (#12064)
parent
5eba02ea94
commit
4d7bb95c2f
|
@ -377,7 +377,7 @@ pub fn run<T>(global_app &T, port int) {
|
||||||
// println('vweb no db')
|
// println('vweb no db')
|
||||||
}
|
}
|
||||||
$for field in T.fields {
|
$for field in T.fields {
|
||||||
if field.is_shared {
|
if 'vweb_global' in field.attrs || field.is_shared {
|
||||||
request_app.$(field.name) = global_app.$(field.name)
|
request_app.$(field.name) = global_app.$(field.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue