22 lines
560 B
Python
22 lines
560 B
Python
from django import forms
|
|
|
|
from engine.core.widgets import JSONTableWidget
|
|
from engine.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(),
|
|
}
|