'Pass the value in the URL through to the form defined on the
ViewSet, which will populate the app property with the app object.
You must define a form which will take an app object.'

def initialize_request(self, request, *args, **kwargs):

    request = super(PaymentAppViewSet, self).initialize_request(request, *args, **kwargs)
    self.app = None
    form = self.form({'app': kwargs.get('pk')})
    if form.is_valid():
        self.app = form.cleaned_data['app']
    return request
