

Return base64.b64encode(stream.getvalue())Īlthough not knowing anything about your REST endpoint design, a better solution in my opinion would be to declare a subresource with a separate view. An common example would be a base64-encoded string: import io If you want to pass the image in a JSON string, you have to encode it as a string and then decode it on the client side. You are trying to render an image (binary data) in a JSON response (string).
#Django rest framework apiview how to#
Data frame: How to compare current row to some other rows without looping?.Delete the last entry of groups in a data frame.R: Manipulate values of one data frame column based on another column.Error in drop & !has.j : invalid 'x' type in 'x & y’ when using sum(complete.cases) Windows7 R3.2.1.

How do I order a dataframe by a vector of column names?.
