2👍
You should have provided the full traceback.
However, I think the issue is with your if user.is_anonymous
check – if it’s true, you return an empty string. But the return value of an inclusion tag must always be a context dict. You should return an empty dict there instead.
Source:stackexchange.com