Closed rantecki closed 3 years ago
Since the order seems to be reversed I had had to replace
parser.tokens.insert(0, token)
with
parser.tokens.append(token)
This is currently one of the problems causing test failures and preventing a new release. Contributions are welcome!
:tada: This issue has been resolved in version 5.0.0-rc.1 :tada:
The release is available on:
v5.0.0-rc.1
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 5.0.0 :tada:
The release is available on:
v5.0.0
Your semantic-release bot :package::rocket:
I'm trying out the latest master on Django 3.1. I understand that this doesn't appear to be officially supported yet, but I noticed support had been enabled in the latest HEAD, so I thought I'd give it a go.
I ran into a strange issue with the
ifinstalled
template tag - it doesn't seem to work at all and tries to include the contents regardless of whether the app is installed.After some investigation, I narrowed this down to the following in the definition of the
isinstalled
tag (in core/templatetags/mezzanine_tags.py):It appears this is processing the nodes in the wrong order (last token first). It looks like
parser.tokens
returns the nodes in reverse order. I can only presume this is a new change in Django 3, but I haven't done any deep investigation into this.A simple and obvious fix for this appears to be:
However, I imagine this would break Django < 3, so you would probably need to add some conditions around this.
Anyway, hopefully this provides enough groundwork for someone more familiar with the project/codebase to take it from here.