from django import forms from core.widgets import JSONTableWidget from payments.models import Gateway, Transaction class TransactionForm(forms.ModelForm): # type: ignore [type-arg] class Meta: model = Transaction fields = "__all__" widgets = { "process": JSONTableWidget(), } class GatewayForm(forms.ModelForm): # type: ignore [type-arg] class Meta: model = Gateway fields = "__all__" widgets = { "integration_variables": JSONTableWidget(), }