Add support for view functions in static views
Merge branch 'static-viewfn'