classy-django-rest-framework
classy-django-rest-framework copied to clipboard
Use repr for an Attribute value
trafficstars
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.