RemovedInDjango110Warning: The context_instance argument of render_to_string is deprecated
Question: For one of the apps, I'm overloading the "delete selected objects" method in a
Django 1.9.x project which uses the Admin panel. For that, I have a code
similar to this:

    
    
    from django.contrib.admin import helpers
    from django.http import HttpResponseRedirect
    from django.shortcuts import render_to_response
    from django.template import RequestContext
    
    class MAdmin(admin.ModelAdmin):
        actions = ['delete_selected']
    
        def delete_selected(self, request, queryset):
            if 'apply' in request.POST:
                # User has confirmed deletion of items
                return HttpResponseRedirect(request.get_full_path())
            else:
                # User must confirm if they wish to delete selected items
                return render_to_response('admin/confirm_delete.html', { 'queryset': queryset, 'action_checkbox_name': helpers.ACTION_CHECKBOX_NAME }, context_instance=RequestContext(request))
    

The last line produces the following warning in the console:

> .../virtualenv/lib/python2.7/site-packages/django/shortcuts.py:45:
> RemovedInDjango110Warning: The context_instance argument of render_to_string
> is deprecated. using=using)

I've tried to find some resource that explains how to "update" syntax
according to version 1.10.x but I've been unable to.

A similar question has already been asked
[here](http://stackoverflow.com/questions/36488024/the-context-instance-
argument-of-render-to-string-is-deprecated) but it's slightly different since
the OP is calling `render_to_string` explicitly and I'm not.

How should I update the call above to make the warning disappear?


Answer: Yes, the "right" way to fix it would be to update it. According to the
[documentation, they recommend using
`render()`](https://docs.djangoproject.com/en/1.9/topics/http/shortcuts/#id1)

> Deprecated since version 1.8: The context_instance argument is deprecated.
> Use the render() function instead which always makes RequestContext
> available.

If you do want to suppress this warning (highly unrecommended), you can use
the `SILENCE_SYSTEM_CHECK` setting.

[More on the system check can be found
here](https://docs.djangoproject.com/en/1.8/ref/checks/#core-system-checks)

