Closed jangeador closed 6 years ago
Thanks for your input. I just pushed version 1.3 to PyPI which I think addresses this issue. If you pivot (or slice a histogram) on a field that has choices defined, the columns will be labeled with the display value from the choices tuple instead of the value stored in the database.
That worked very well. Thanks!
The row
parameter (name of column that will key the rows) is not aware of the choices. This probably should know also if there are choices defined for it.
Thanks, you're right about the row parameter. In version 1.6, now available on PyPI, if the row field has choices, the display value will be used as the key in the result.
You are the man. Thanks.
Edit: just got a chance to test this. It is not working. Please refer to #3 for more info
Is there any way to make the field display the get_foo_display value for choices fields? Right now I am having to do this:
where the values
MP
,PP
,P
, andHP
already live in the Choices tuple.