Skip to content
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

Use repr for an Attribute value #50

Open
KommuSoft opened this issue Jan 11, 2023 · 0 comments
Open

Use repr for an Attribute value #50

KommuSoft opened this issue Jan 11, 2023 · 0 comments

Comments

@KommuSoft
Copy link
Contributor

For string values for attributes, for example on a GenericAPIView, it uses:

lookup_field = pk

(see https://www.cdrf.co/3.7/rest_framework.generics/GenericAPIView.html )

It thus fails to perform a repr over the item and thus displays it as a variable. We can use repr to show this as:

lookup_field = 'pk'

instead.

KommuSoft added a commit to hapytex/classy-django-rest-framework that referenced this issue Jan 11, 2023
fjsj added a commit that referenced this issue Jan 16, 2023
use repr for attribute values, fixing #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant