Opened 9 years ago

Closed 9 years ago

#26598 closed Bug (invalid)

{{ }} is not getting parsed by pyjade as expected with django

Reported by: Himanshu Pandey Owned by: nobody
Component: Template system Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have line of pyjade

 a.js-track(data-track-data="{\"Job ID\":\"{{ job_details|get_or_na:'id' }}\",\"Job Title\":\"{{ job_details|get_or_na:'title' }}\",\"Company Name\":\"{{ job_details|get_or_na:'organization'|get_or_na:'name' }}\"}", data-track-dynamic-attrs="[\"Stakeholder\"]",href="{% url 'job_detail' job_details.title|slugify job_details.id %}")

which is being rendered as

<a href="/job/operations-manager/b1ac846e-6834-40c4-8bcf-122c093820b1/" data-track-data="{"Job ID":"{{ job_details|get_or_na:'id' }}","Job Title":"{{ job_details|get_or_na:'title' }}","Company Name":"{{ job_details|get_or_na:'organization'|get_or_na:'name' }}"}" data-track-dynamic-attrs="["Stakeholder"]" class="js-track">



I expect it to {{ }} being replaced by intended values rather than being rendered with html.
I am using 4.0.0 version of pyjade here as templating language.

Stack overflow link of given bug: http://stackoverflow.com/questions/37006480/is-not-getting-parsed-by-pyjade-as-expected-with-django

Change History (1)

comment:1 by Aymeric Augustin, 9 years ago

Resolution: invalid
Status: newclosed

I believe you're using pyjade, a third-party project, incorrectly.

There's no evidence of a bug in Django here.

Please see TicketClosingReasons/UseSupportChannels.

Note: See TracTickets for help on using tickets.
Back to Top