2

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?

BobbyShaftoe
  • 28,337
  • 7
  • 52
  • 74
dementrock
  • 917
  • 3
  • 9
  • 21
  • I haven't used pyjade, but I'm guessing you're looking for: `a(href=url_for("browse_problem", problem_id=problem._id))` – twooster Jan 18 '12 at 20:47

2 Answers2

4

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))
Syrus Akbary Nieto
  • 1,249
  • 12
  • 20
1

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

dementrock
  • 917
  • 3
  • 9
  • 21
  • I'd love it if you could submit a patch for this on GitHub... https://github.com/SyrusAkbary/pyjade – Roshambo Jan 24 '12 at 22:37
  • @Roshambo I have a forked repo which solved this problem: https://github.com/dementrock/pyjade. However it may cause other problems (see https://github.com/SyrusAkbary/pyjade/pull/5) – dementrock Feb 06 '12 at 04:02