Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix template.render deprecation warnings for Django 1.9 #3654

Merged
merged 1 commit into from
Nov 18, 2015

Conversation

andreif
Copy link
Contributor

@andreif andreif commented Nov 18, 2015

context = RequestContext(renderer_context['request'], context)
ret = template.render(context)
else:
ret = template.render(context, request=renderer_context['request'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go to the compat.py file and should be similar to the new API.

@xordoquy
Copy link
Collaborator

Thanks for fixing this. I think the code should be moved to compat.py and be given an API similar to Django's new one.

@andreif
Copy link
Contributor Author

andreif commented Nov 18, 2015

Ok, I fix

@andreif andreif force-pushed the fix/deprecation-warning-1.9 branch from 3bf5dfd to 802ee5d Compare November 18, 2015 16:10
@andreif
Copy link
Contributor Author

andreif commented Nov 18, 2015

@xordoquy Done.

@tomchristie tomchristie added this to the 3.3.2 Release milestone Nov 18, 2015
@tomchristie
Copy link
Member

Looks good - thanks!

tomchristie added a commit that referenced this pull request Nov 18, 2015
Fix template.render deprecation warnings for Django 1.9
@tomchristie tomchristie merged commit 43c45cc into encode:master Nov 18, 2015
@andreif andreif deleted the fix/deprecation-warning-1.9 branch November 18, 2015 16:19
@jezdez
Copy link

jezdez commented Nov 24, 2015

We're trying to switch to Django 1.8 using django-jinja which expects to be passed a request to the render method. I was wondering if the condition whether to pass in the request could be modified in DRF to be checking for < (1, 8) instead?

@xordoquy
Copy link
Collaborator

Indeed, this seems to have slip through.

@xordoquy
Copy link
Collaborator

@jezdez thanks for the report !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants