Hi
I'm trying to create wrapper/decorator functions like so:
The view to load is the same html file every time, the args need to be different.
I can pass arguments using request.args[0] etc. but it seems dirty and I prefer to separate and handle pre-processing the data (according to args) in the wrapping functions & then call the generalFunc.
def func1():
var1 = ...
var2 = ...
return genralFunc(var1 , var2 )
def func2():
var1 = ...
var2 = ...
var3 = ...
return genralFunc(var1 , var2 , var3)
def generalFunc(a , b , c):
...dostuff...
return (dict( ...... all page data .....))
user calls controller/func1 => main_page.html
user calls controller/func2 => main_page.html
Each time with different data