TIL: Making a Django REST framework view do server-side rendering
#til #django #djangorestramework #python
On a recent project I found myself needing one classic form-and-template style page in an otherwise API-driven project. I could, of course, [just do it] with a regular view function, but I had a bunch of authentication and suchlike set up for DRF APIView
s.
Turns out it's actually pretty easy to make an APIView
kick it oldschool!