api.viewsets

class api.viewsets.OwnerViewSet(**kwargs)[source]

A simple ViewSet for objects filtered by their ‘owner’ attribute.

To use it, at minimum you’ll need to provide the serializer_class attribute and the model attribute shortcut.

get_queryset()[source]
perform_create(serializer)[source]
permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'api.permissions.IsOwner'>]
post_save(obj)[source]

A post_save hook for performing actions after the object has been pushed to the database.

Leave it up to child classes to implement.