From 4d7bb95c2ff6761d069f336b112042b74b7ac6a6 Mon Sep 17 00:00:00 2001 From: Anton Zavodchikov Date: Tue, 12 Oct 2021 06:35:36 +0300 Subject: [PATCH] vweb: add a `vweb_global` attribute (#12064) --- vlib/vweb/vweb.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index e21ef653f6..2278e0b60b 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -377,7 +377,7 @@ pub fn run(global_app &T, port int) { // println('vweb no db') } $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) } }