Beispiel #1
0
 def view(request, template_name):
     tmpl = Template("{{ test }}")
     return HttpResponse(tmpl.stream({"test": "success"}))
Beispiel #2
0
    def test_stream_without_template_debug_setting(self):
        signals.template_rendered.connect(self._fail_listener)

        with self.settings(TEMPLATE_DEBUG=False):
            tmpl = Template("OK")
            tmpl.stream()
Beispiel #3
0
 def test_stream(self):
     with self.settings(TEMPLATE_DEBUG=True):
         tmpl = Template("OK")
         tmpl.stream()
Beispiel #4
0
 def view(request, template_name):
     tmpl = Template("{{ test }}")
     return HttpResponse(tmpl.stream({"test": "success"}))
Beispiel #5
0
    def test_stream_without_template_debug_setting(self):
        signals.template_rendered.connect(self._fail_listener)

        with self.settings(TEMPLATE_DEBUG=False):
            tmpl = Template("OK")
            tmpl.stream()
Beispiel #6
0
 def test_stream(self):
     with self.settings(TEMPLATE_DEBUG=True):
         tmpl = Template("OK")
         tmpl.stream()