For personal reasons, I wanted to call the PandasCSVRenderer
on a dataframe outside of a view.
Because renderer_context
is defaulted to None
, the following code will throw TypeError: argument of type 'NoneType' is not iterable
:
from rest_pandas import renderers data_frame = pandas.DataFrame(some_data) print renderers.PandasCSVRenderer().render(data_frame) >>>TypeError: argument of type 'NoneType' is not iterable
I suggest two options to fix the following code:
if renderer_context and 'response' in renderer_context:
if renderer_context is None: renreder_context = {} ...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4