On Thu, Apr 23, 2009 at 1:42 AM, Álvaro Justen [Turicas]
<alvarojus...@gmail.com> wrote:
> Hello,
> if I have:
>
> {{extend "template.html"}}
>
> instead of
>
> {{extend 'template.html'}}
>
> in myview.html, admin 'design' page of app show some buggy
> information, like this:
>
> # myview.html [ edit | htmledit | delete ] extends template.html"}}
> <div id="... (all the rest of view code)
>
> I know that extend is not a Python pattern, but if web2py support pure
> Python in views, it have to support these forms of strings: "mystr",
> 'mystr', '''mystr''' and """mystr""".

Thiss bug is in line 29 of gluon/myregx.py:

    re.compile('^\s*(?P<all>\{\{\s*extend\s+[\'"](?P<name>[^\']+)[\'"]\s*\}\})'

It can be fixed with:

    re.compile('^\s*(?P<all>\{\{\s*extend\s+[\'"](?P<name>[^\'"]+)[\'"]\s*\}\})'

"include" statement has the same bug, line 25:

    re.compile('(?P<all>\{\{\s*include\s+[\'"](?P<name>[^\']*)[\'"]\s*\}\})'

To fix, change to:

    re.compile('(?P<all>\{\{\s*include\s+[\'"](?P<name>[^\'"]*)[\'"]\s*\}\})'

This don't add support to """mystr""" and '''mystr'''.

-- 
 Álvaro Justen
 Peta5 - Telecomunicações e Software Livre
 21 3021-6001 / 9898-0141
 http://www.peta5.com.br/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to