If they extend a layout and therefore must be generated dynamically, they
cannot be served as static files. Static files have to be fixed documents
that can be served without running any app code. If you need to generate
the files dynamically based on web2py templates, treat them like any other
web2py page. You might create a single function, and serve the appropriate
content based on request.args(0) -- you could use that to set response.view
to point to the correct view file with the requested content.
Anthony
On Tuesday, June 26, 2012 7:43:13 AM UTC-4, Annet wrote:
>
> I'd like to put some static files, like disclaimer.html and privacy.html
> in /static/files/. These files extend a default/layout.html view.
>
> What is the best way do this? Have a controller with a function for every
> static file and in the layout file have {{include
> 'static/files/disclaimer.html'}}? Or is there a better way to do this?
>
>
> Kind regards,
>
> Annet
>
--