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

@xordoquy xordoquy Nov 18, 2015

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

xordoquy commented Nov 18, 2015

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 Nov 18, 2015
@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

tomchristie commented Nov 18, 2015

Looks good - thanks!

tomchristie added a commit that referenced this issue Nov 18, 2015
Fix template.render deprecation warnings for Django 1.9
@tomchristie tomchristie merged commit 43c45cc into encode:master Nov 18, 2015
3 checks passed
@andreif andreif deleted the fix/deprecation-warning-1.9 branch Nov 18, 2015
@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

xordoquy commented Nov 25, 2015

Indeed, this seems to have slip through.

@xordoquy
Copy link
Collaborator

xordoquy commented Nov 25, 2015

@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.

None yet

4 participants