File size: 483 Bytes
907001b
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
def _embed(self, request, response):
    """pass"""
    if self._match(request, response):
        head = render_to_string('chosenadmin/_head_css.html', {'chosen_css': self._chosen_css()})
        body = render_to_string('chosenadmin/_script.html', {'chosen_js': self._chosen_js()})
        content = response.rendered_content
        content = content.replace('</head>', head)
        content = content.replace('</body>', body)
        response.content = content
    return response