Skip to content

Commit

Permalink
Removing every occurrence of Requestcontext and Context
Browse files Browse the repository at this point in the history
  • Loading branch information
Hodossy Szabolcs committed Sep 26, 2017
1 parent af26da6 commit 829d1cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions categories/editor/tree_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from django.contrib.admin.options import IncorrectLookupParameters
from django import template
from django.shortcuts import render_to_response

import django
Expand Down Expand Up @@ -253,15 +252,11 @@ def old_changelist_view(self, request, extra_context=None):
'selection_note_all': selection_note_all % {'total_count': cl.result_count},
})
context.update(extra_context or {})
context_instance = template.RequestContext(
request,
context
)
return render_to_response(self.change_list_template or [
'admin/%s/%s/change_list.html' % (app_label, opts.object_name.lower()),
'admin/%s/change_list.html' % app_label,
'admin/change_list.html'
], context=context_instance.flatten())
], context=context)

def changelist_view(self, request, extra_context=None, *args, **kwargs):
"""
Expand Down
3 changes: 1 addition & 2 deletions categories/tests/test_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def render_template(self, template_string, context={}):
Return the rendered string or raise an exception.
"""
tpl = template.Template(template_string)
ctxt = template.Context(context)
return tpl.render(ctxt)
return tpl.render(context)

def testTooFewArguments(self):
"""
Expand Down

0 comments on commit 829d1cc

Please sign in to comment.