【发布时间】:2011-12-06 21:04:54
【问题描述】:
我在尝试加载模板时不断收到此错误:
TypeError: cannot concatenate 'str' and 'WSGIRequest' objects
这里是粘贴的链接:https://gist.github.com/3b7039baf13d91a67de2
您会注意到,从 traceback 中的一行指向我的 views.py 以及下面方法中的最后一行。最后一行可能是问题吗?如果是,我该如何解决它。提前致谢
def all(request):
"""This returns all the photos in the database
"""
return render_to_response(request, 'photos/all.html', {'photos':
Photo.objects.all().order_by('-date_added')})
【问题讨论】:
标签: django django-templates django-views