generic views or viewsets with mixins, which is the better choice?
239 views
Skip to first unread message
Sagar Bhadarka
unread,
Jul 19, 2018, 6:54:05 AM7/19/18
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 REST framework
Hello everyone, I want to insert user registration data in database and currently I did that using generic views. But I think that may be viewsets is better option. I don't have any previous experience with django. so can anyone explain which is the better choice. And if viewsets is better choice then should i use mixins? I have look at documentation and other articles as well. But still I'm little confused. I'm sure that each of them has their own advantages and disadvantages. Can anyone explain in which situation what is the better option?
Jason
unread,
Jul 19, 2018, 7:04:49 AM7/19/18
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
basically, use viewsets if you're implementing a highly standard API that doesn't deviate much from the default implementation features in DRF. Otherwise, if you need customization and specific things, then implementing a generic view and overriding would be better. It all depends on your use case.