Hi
I tried to figure out this problem more carefully and I found the
reason why my app didn't work anymore:
If the parent block contains {{include 'some_file'}} and view tries to
extend it by calling {{super}}, whole parent block will be ignored!!!
I don't see any error messages etc. This behavior has been changed
after version 1.94.6. The same code works in 1.94.6 but not in
1.95.1. Unfortunately I do not know web2py internals enough to figure
out what has been changed since!
Simplified test case:
controller function (default.py):
--------------------------------------------------------------
def test():
return dict();
--------------------------------------------------------------
view (test.html):
-------------------------------------------------------------
{{extend 'layout.html'}}
{{block content}}
this text will be shown in web page correctly
{{super}}
{{end content}}
--------------------------------------------------------------
view (layout.html): (stripped down, only relevant block is shown)
-------------------------------------------------------------
.....
{{block content}}
this text wont be seen in web page if this block is
extended by calling super!
{{include 'test.txt'}}
{{end content}}
.....
-------------------------------------------------------------
dummy text file (test.txt)
-------------------------------------------------------------
"some irrelevant text to be included into view"
-------------------------------------------------------------
If I remove {{include 'text.txt'}} from layout.html everything works
perfectly (text/code from the parent block will be included in
extended block). Web2py doesn't allow include directives in parent
blocks anymore!!
Teemu