Hi, Anthony,

thank you for explaining the meaning of the 'context' argument. It works now as expected.

The suggested approach with variable in extend is neater. It works well in my development environment. But in the production environment I use web2py behind Apache through WSGI. If I compile_models, compile_controllers instead of compile_application, it leads to "invalid view (default/index.html)" error. Is it true, that {{extend variable}} can't be used in combination WSGI, since whole app has to be compiled?

David

On 21.7.2015 22:32, Anthony wrote:
Your context is an empty dict, so the template doesn't see any of the
usual globals.

Anyway, this approach is unnecessary. The argument to extend can be a
Python expression, do just use the extendtempl variable in the extend
statement in the view. The only drawback is that you won't be able to
compile this particular view, but you couldn't do that with your
approach either.

Anthony


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to