Conditional conflict in template with following div

Link to my stack overflow question here: My Question

{% if permission <= 4 %}
  <div class='row'>

VIM detects an issue also:

When I switch the conditional around the issue goes away.
(I can’t post proof due to the new user limit to one media upload.)
Basically the < turns it’s normal red and it becomes a valid tag.

I feel like I’m missing something simple but it’s difficult to narrow my search down to something like this.

Any help would be appreciated.
Thank you!

Maybe I can upload it here.

Can you tell what error occurs when you run the django server?

I agree with the previous reply. Syntactically, it’s valid Django template syntax. Without seeing an error message that gets thrown, there’s as much a chance it’s an issue with whatever editor you’re using as with the code itself.

Good Question. I went back to check and there is no error message. It just doesn’t load the div.
I’m not sure how to generate errors for this.

So I tried to force the value to print and realized I needed ‘request.session.permission’ instead of just ‘permission’.
Now it works. I guess I got distracted by the vim issue and went down the wrong direction.

Thanks guys!