Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSteve Wehba
831 PointsRandom question: PATCH from DRF browsable API
I have a somewhat random question: I have a test API that has a model class called Exercise. I would like to PUT, PATCH, and DELETE Exercises from the DRF browsable API. On the backend, the ExerciseDetail view inherits from RetrieveUpdateDestroyAPIView.
I do indeed see PATCH listed in the browsable API (see link). However, I only see a PUT button. How do I do a PATCH from the browsable API? Or, is that not possible?
Screenshot: https://d.pr/i/MPWsk1+
1 Answer
Alex Koumparos
Python Development Techdegree Student 36,887 PointsHi Steve,
The Browsable API does support PATCH but only when using the "Raw data" input form, not when using the "HTML form", as can be seen from the template source code: base.html
.
Cheers
Alex