

def dispatch(self, request, object_pk, model, *args, **kwargs):
    admin_model = ralph_site._registry[model]
    self.model = model
    if (not request.user.has_perm('{}.add_{}'.format(self.model._meta.app_label, self.model._meta.model_name))):
        return HttpResponseForbidden()
    self.info_fields = admin_model.multiadd_info_fields
    self.obj = get_object_or_404(model, pk=object_pk)
    self.fields = admin_model.get_multiadd_fields(obj=self.obj)
    self.clear_fields = admin_model.get_multiadd_clear_fields(obj=self.obj)
    self.one_of_mulitval_required = admin_model.one_of_mulitvalue_required
    return super().dispatch(request, *args, **kwargs)

dataset/ETHPy150Open allegro/ralph/src/ralph/admin/views/multiadd.py MultiAddView.dispatch/original