Skip to content

Conversation

mogosselin
Copy link
Contributor

When using render_activity and passing a context, Django 1.11 raises the error:
context must be a dict rather than Context.

Check if the current version is less than 1.11, if so, use the class Context, otherwise pass the normal dictionary context to loader.get_template(template_name).render(context).

Django’s template rendering in 1.11 needs a dictionary as the context
instead of the object Context, otherwise the following error is raised:
context must be a dict rather than Context.
@tbarbugli
Copy link
Member

thank you for the PR!

@tbarbugli tbarbugli merged commit 61d24e5 into GetStream:master Apr 18, 2017
@okrutny
Copy link

okrutny commented Apr 30, 2017

Actually it doesn't fix the issue, as in render_activity template tag there is already context of type Context, not dict. Please check PR #61

@tbarbugli tbarbugli mentioned this pull request May 1, 2017
@mogosselin mogosselin deleted the django-1_11-compatibility branch May 3, 2017 07:53
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

Successfully merging this pull request may close these issues.

3 participants