プロジェクトにdjangoフレームワークを使用しています。ビューを介してテンプレートに渡すオブジェクトがあります。ビューでコンテンツを印刷するとオブジェクトは正常に動作しますが、テンプレート html で使用するとエラーが発生します。render_to_response 関数を使用しています
render_to_response('template.html',context_instance=RequestContext(request,request_params))
エラーは
Value Error
Expected a Field, got a <type 'str'>
ビューでデータを送信しています
request_params = {'data':my_object}
return render_to_response('template.html',context_instance=RequestContext(request,request_params))
#where my_object has variables like my_objects.variable1,my_objects.variable2
テンプレートでは、データを次のように取得しています。
...
{% if data %}
{{data.variable1}}
{% endif %}
どうすれば解決できますか?ありがとう