|
@@ -2,6 +2,7 @@ from django.shortcuts import render
|
2
|
2
|
from django.http import HttpResponse
|
3
|
3
|
|
4
|
4
|
from asgiref.sync import async_to_sync,sync_to_async
|
|
5
|
+from django.template import Template, RequestContext
|
5
|
6
|
|
6
|
7
|
import inspect
|
7
|
8
|
|
|
@@ -37,8 +38,15 @@ def fn_v(request,*a,**kw):
|
37
|
38
|
def fn_v0(request,*a,**kw):
|
38
|
39
|
return HttpResponse("fn_v0")
|
39
|
40
|
|
|
41
|
+arbitrary_string_as_template = "{% csrf_token %}"
|
40
|
42
|
def fn_v1(request,*a,**kw):
|
41
|
|
- return render("{% csrf_token %}")
|
|
43
|
+
|
|
44
|
+ # return render()
|
|
45
|
+
|
|
46
|
+ template = Template(arbitrary_string_as_template)
|
|
47
|
+ context = RequestContext(request)
|
|
48
|
+ return HttpResponse(template.render(context))
|
|
49
|
+
|
42
|
50
|
return HttpResponse("fn_v1")
|
43
|
51
|
|
44
|
52
|
def fn_v2(request,*a,**kw):
|