1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

comptime: fix $(field.name) in $for; vweb: shared fields

This commit is contained in:
Alexander Medvednikov
2021-06-16 20:33:30 +03:00
parent b2e2a53f98
commit eacdd0d7e1
5 changed files with 40 additions and 13 deletions

View File

@@ -324,6 +324,14 @@ pub fn run<T>(global_app &T, port int) {
} $else {
// println('vweb no db')
}
$for field in T.fields {
// if field.is_shared {
// println(field)
//}
//$if field.typ is string {
request_app.$(field.name) = global_app.$(field.name)
//}
}
request_app.Context = global_app.Context // copy the context ref that contains static files map etc
// request_app.Context = Context{
// conn: 0