Django Middleware vs. DRF Permission Classes for Validations

78 views
Skip to first unread message

Dinesh Dass Subramanian

unread,
Oct 17, 2019, 10:31:50 AM10/17/19
to Django users
I am going to develop a web application with front-end being angular and backend being Django REST Framework. There is a need to do several validations from HTTP request including access token and api key validations. The key point is that some validations will be applicable for all APIs and some will be applicable to APIs on a need basis. I need to know the best approach on whether I could have a custom middleware for validations based on API endpoints or should I use Permission classes of DRF for validations based on API endpoints?
Reply all
Reply to author
Forward
0 new messages