How to include inline content in pyjade

1.1k views Asked by At

I had the following code in my jade file:

a(href='{{url_for("browse_problem", problem_id=problem._id)}}')

I was trying to evaluate the url_for function and set the value as the href attribute, but the code above does not work. Can someone help me correct it?

2

There are 2 answers

2
dementrock On

I solved this problem myself by changing some code inside pyjade... Seems to be a bug when parsing content including 'class' or 'id'.

0
Syrus Akbary Nieto On

This bug is fixed in the new version 1.0 of pyjade.

Check it out!

This new code is totally compatible with the new version:

a(href=url_for("browse_problem", problem_id=problem._id))