{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/d9cdf9d9857c1064b77ae6ac8cd03dfd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d9cdf9d9857c1064b77ae6ac8cd03dfd","url":"https://api.github.com/users/klipstein","login":"klipstein","id":158866},"milestone":null,"updated_at":"2011-11-06T12:58:50Z","labels":[],"assignee":null,"comments":0,"closed_at":null,"url":"https://api.github.com/repos/klipstein/dojango/issues/44","body":"<pre>\n<b>What steps will reproduce the problem?</b>\n1. Create a model with a ImageField\r\n2. Create a datagrid of that model\r\n3. The view the datagrid loads to get the data will fail with messages like :\r\n&lt;ImageFieldFile: None&gt; is not JSON serializable\r\n\r\n<b>What is the expected output? What do you see instead?</b>\nExpected json output for the dojo.data api to populate the grid.\r\n\r\n<b>What version of the product are you using? On what operating system?</b>\nDojango 0.4.6, Dojo 1.4.2, Django 1.1.1-1ubuntu1 (ubuntu karmic package).\r\nRunning with local development server.\r\n\r\n<b>Please provide any additional information below.</b>\nLogs from the development server:\r\n===============Exception=============\r\n\r\n&lt;ImageFieldFile: None&gt; is not JSON serializable\r\n\r\n\r\n{'numRows': 1, 'items': [{'status': u'O', 'model_id': 1L,\r\n'vehicle_category_id': 2L, 'number_of_doors': 4L, 'key_name':\r\nu'testkeyname', 'transmission_type': u'A', 'image': &lt;ImageFieldFile: None&gt;,\r\n'year': 345L, 'id': 1L, 'registration_number': u'TestRegNumber'}],\r\n'identifier': 'id', 'success': True}\r\n\r\nThis is an issue even if the list_display is set and does not include the\r\nimage field, since the image field still gets added into the 'complete'\r\narray which is then serialized into json.\r\n\r\nI have attached a patch which fixes this by not including image fields in\r\nthe items, but this will only help for models where there is a image field\r\nbut we don't need it included on the grid. \r\n\r\nI'm quite new to django and dojango and fairly new to dojo, so hopefully\r\nthis is right.\n</pre></br>Original link: http://code.google.com/p/dojango/issues/detail?id=44","html_url":"https://github.com/klipstein/dojango/issues/44","title":"44 - datagrid fails on models with a imagefield. ","number":44,"id":2155972,"created_at":"2011-11-06T12:58:50Z"},"action":"opened"}