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

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

Open
himanshu0511 opened this issue May 9, 2016 · 2 comments
Open

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

himanshu0511 opened this issue May 9, 2016 · 2 comments

Comments

@himanshu0511
Copy link

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.

Link to bug created on stack overflow: http://stackoverflow.com/questions/37006480/is-not-getting-parsed-by-pyjade-as-expected-with-django
Link to issue on django: https://code.djangoproject.com/ticket/26598#ticket

@shimanshu31
Copy link

I also have same issue. Did you solve it?

@tdamsma
Copy link
Contributor

tdamsma commented Nov 29, 2016

Why do you sometimes use {% .... %} and sometimes {{ ... }} for properties that should be rendered?

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