Skip to content
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

pyjade.runtime.attrs(attrs=[('class', ((title=='About'?'active':undefined)))], terse=True) #246

Open
glassresistor opened this issue Feb 20, 2016 · 2 comments

Comments

@glassresistor
Copy link

This is failing is there another way to do this?

@guneysus
Copy link

I am also stucked.

I dont know why size failing but class is a reserved keyword for Python.

    input(name="title" type="text" size=82)
    input(name="title" type="text" class="foobar")
    input(name="title" type="text" value="foobar")

Pyjade compiles my jade files to Tornado templates to non-compatible html files.

I want simply this

<form action="{{ request.path }}" method="post" class="compose">
<input name="title" type="text" size=82 class="title" value="{{ escape(entry.title) if entry else "" }}"/>

But pyjade compiles to this

<form{% raw __pyjade_attrs(attrs=[('action',(request.path))]) %} method="POST">
  <input name="title"{% raw __pyjade_attrs(attrs=[('type',("text" size=82 class="title" value={{ escape(entry.title) }}))]) %}/>
</form>

@chdsbd
Copy link

chdsbd commented Jul 14, 2016

I'm having a similar issue with pyjade.
I cannot use the type attribute of the input element without an exception being thrown.

File "/usr/local/lib/python3.5/site-packages/pyjade/ext/html.py", line 88, in visitExtends
    raise pyjade.exceptions.CurrentlyNotSupported()
pyjade.exceptions.CurrentlyNotSupported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants