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

"or" statement does not work as expected in "if" tests #157

Open
hoh opened this issue Feb 24, 2014 · 0 comments
Open

"or" statement does not work as expected in "if" tests #157

hoh opened this issue Feb 24, 2014 · 0 comments

Comments

@hoh
Copy link

hoh commented Feb 24, 2014

Testing for the empty value of two Django variables fails when using the HAML syntax but works with the Django templating syntax.

This failed:

-if myobject.attr1 or myobject.attr2
    %div foobar

This worked:

{% if myobject.attr1 or myobject.attr2 %}
    %div foobar
{% endif %}

Using hamlpy==0.82.2 and Django==1.6.1.

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

1 participant