'Override form kwargs based on input fields
The admin posts to this view initially, so detect the send button on
form post variables. Drop additional fields if we see the send button.'

def get_form_kwargs(self):

    kwargs = super(SendNotificationView, self).get_form_kwargs()
    kwargs['notification_classes'] = self.notification_classes
    if ('send' not in self.request.POST):
        kwargs.pop('data', None)
        kwargs.pop('files', None)
    return kwargs
