Generalizing nested get_queryset and ordering
Create generalized methods for nested viewsets. There is now a default get_queryset method which finds the nested model queryset through the parent object; the user can specify filtering parameters as well. We also added a order_by filter for list views; parameters can be specified on the class.
Showing
- gracedb/api/v1/mixins.py 30 additions, 0 deletionsgracedb/api/v1/mixins.py
- gracedb/api/v1/superevents/views.py 14 additions, 63 deletionsgracedb/api/v1/superevents/views.py
- gracedb/api/v1/superevents/viewsets.py 3 additions, 2 deletionsgracedb/api/v1/superevents/viewsets.py
- gracedb/api/v1/viewsets.py 23 additions, 0 deletionsgracedb/api/v1/viewsets.py
Loading
Please register or sign in to comment