-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin renderer displays True
and False
in place of integers 1 and 0
#3227
Labels
Milestone
Comments
That seems to be because of this in the
|
Looks like that should be changed to something like if isinstance(value, bool) or value is None: |
Or slightly more to the point: from types import NoneType
...
if isinstance(value, (bool, NoneType)): |
Thanks folks. |
This was referenced Mar 9, 2017
This was referenced Oct 16, 2017
This was referenced Nov 6, 2017
This was referenced Nov 14, 2017
This was referenced Dec 10, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When viewing an endpoint using the Admin renderer, cases where the integer 1 or 0 should be displayed, such as object ids and foreign keys, instead display the corresponding
![drf-admin-truefalse](https://cloud.githubusercontent.com/assets/498431/9113843/4f6fc230-3c1c-11e5-920f-d88689b3eb05.png)
True
orFalse
value..The text was updated successfully, but these errors were encountered: