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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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?