twoscoops / two-scoops-of-django-1.6

Tracking thoughts and feature requests for Two Scoops of Django 1.6
51 stars 7 forks source link

Code Example 14.2 p178 #70

Closed danodonovan closed 9 years ago

danodonovan commented 10 years ago

New django-rest framework (2.3+) requires GenericAPIView (a mixin for these CBVs) to have a lookup_field attribute - I couldn't get these examples to run without first setting

     lookup_field = 'slug'

otherwise the view defaults to pk (at least for the ReadUpdateDestroyAPIView)

pydanny commented 9 years ago

:ship: