mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
[1.7.x] Avoided using private API get_template_from_string.
Conflicts:
django/contrib/webdesign/tests.py
Backport of c0c1bb9e from master.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.template import loader, Context
|
||||
from django.template import Context, Template
|
||||
|
||||
from .models import Person
|
||||
|
||||
@@ -11,5 +11,5 @@ def get_person(request, pk):
|
||||
|
||||
|
||||
def no_template_used(request):
|
||||
template = loader.get_template_from_string("This is a string-based template")
|
||||
template = Template("This is a string-based template")
|
||||
return HttpResponse(template.render(Context({})))
|
||||
|
||||
Reference in New Issue
Block a user