获取get_模板Python中的错误
我已经用PythonDjango写下了这段代码,以使用模板和获取错误。 我的Django版本:1.8.3获取get_模板Python中的错误,python,templates,django-templates,Python,Templates,Django Templates,我已经用PythonDjango写下了这段代码,以使用模板和获取错误。 我的Django版本:1.8.3 from django.shortcuts import render from django.http import HttpResponse from django.template.loader import get_template from django.template import Context def hello_template (request): na
from django.shortcuts import render
from django.http import HttpResponse
from django.template.loader import get_template
from django.template import Context
def hello_template (request):
name = "Jatin"
t = get_template('hello.html')
html = t.render(Context({'name': name}, request))
return HttpResponse(html)
错误:
AttributeError at /hello_template/
'str' object has no attribute 'copy'