私はこの単純なビュー機能を持っています:
def location(request,locname,lid):
try:
location = Location.objects.get(id=lid)
return render_to_response('location.html',{'location':location},context_instance=RequestContext(request))
except Location.DoesNotExist:
return render_to_response('404.html',{},context_instance=RequestContext(request)) #<-- error line
しかし、私はIndexError: string index out of range
本番サーバーでしか取得していません。
エラー行は最終行にあります。
ここで何が間違っていますか?