Python Forum

Full Version: Could not parse the remainder: '=' from '='
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am upgrading from python 2 to 3 .



{% if category = 'media-articles' %}
Could not parse the remainder: '=' from '='


This strange issue has come up anew.
Please note that this code was working fine with python2.7

I have tried all the said solutions of extra space around the operator.
Kindly help me solve this issue and if required apply a fix in python3 as well.

This issue is found in python3.5 and python3.6 environments.
Shouldn't it be
Output:
{% if category == 'media-articles' %}
I don't think your original code would work in python2 either
(Feb-20-2019, 10:21 AM)buran Wrote: [ -> ]Shouldn't it be
Output:
{% if category == 'media-articles' %}
I don't think your original code would work in python2 either
In the initial code it was = , but yes you are right. Logically it should be ==.

Although the sadder part is , I've tried all possibilities including this and it's giving the same exact error.
(Feb-20-2019, 11:15 AM)Saurabh Wrote: [ -> ]Although the sadder part is , I've tried all possibilities including this and it's giving the same exact error.


Please post full traceback in error tags, as well as the relevant code that render the template - in python tags