New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<%namespace:defname> converts the method name to lowercase #108

Closed
sqlalchemy-bot opened this Issue Apr 16, 2009 · 4 comments

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Apr 16, 2009

Migrated issue, originally created by Anonymous

This raises a problem when the defname contains uppercase letters as the closing tag won't match the opening tag meaning you have to fall back to using call to call the method.

=== Example ===

<%def name="renderPanel(panel)">
    <div class="x-panel">
        <h1 class="x-panel-title">${panel.title}</h1>
        <div class="x-panel-content">
        </div>
    </div>
</%def>

<%def name="renderTablePanel(panel)">
    <%self:renderPanel panel="${panel}">
        ${self.renderTable(panel.table)}
    </%self>
</%def>

=== Error ===
SyntaxException: Closing tag does not match tag: <%self:renderpanel> in file 'panels.mao' at line: 46 char: 2


Attachments: fix-namespacedef.patch

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Apr 16, 2009

Anonymous wrote:

Missed out the caller.body in the example:

<%def name="renderPanel(panel)">
    <div class="x-panel">
        <h1 class="x-panel-title">${panel.title}</h1>
        <div class="x-panel-content">
            ${caller.body()}
        </div>
    </div>
</%def>

<%def name="renderTablePanel(panel)">
    <%self:renderPanel panel="${panel}">
        ${self.renderTable(panel.table)}
    </%self>
</%def>
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Apr 16, 2009

Anonymous wrote:

The attached patch appears to fix the error, I've no idea if the .lower() was only required just makes things case sensitive?

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Apr 19, 2009

Michael Bayer (@zzzeek) wrote:

weird, that lower() must have been there since the beginning. thanks for the patch, b06cd0f.

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Apr 19, 2009

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment