def get_next_action(self, request, application, label, roles):
        """ Django view method. """
        actions = self.get_actions(request, application, roles)
        if label is None and \
                'is_applicant' in roles and 'is_admin' not in roles:
            # applicant, admin, leader can reopen an application
            for action in actions:
                if action in request.POST:
                    return action
            return render(
                template_name='kgapplications/common_declined.html',
                context={
                    'application': application,
                    'actions': actions,
                    'roles': roles
                },
                request=request)
        return super(StateDeclined, self).get_next_action(
            request, application, label, roles)
def get_next_action ( self , request , application , label , roles ) : actions = self . get_actions ( request , application , roles ) if label is None and 'is_applicant' in roles and 'is_admin' not in roles : for action in actions : if action in request . POST : return action return render ( template_name = 'kgapplications/common_declined.html' , context = { 'application' : application , 'actions' : actions , 'roles' : roles } , request = request ) return super ( StateDeclined , self ) . get_next_action ( request , application , label , roles )
Django view method.