schon/payments/forms.py
Egor fureunoir Gorbunov 3b7c405e84 Features: 1) Add GatewayForm to manage Gateway model; 2) Enhance GatewayAdmin with list display, search, and ordering; 3) Introduce integration_variables field in the Gateway model; 4) Expand support for currencies with symbols via CURRENCIES_WITH_SYMBOLS;
Fixes: 1) Add missing Gateway import in forms and admin modules; 2) Correct maximum lengths for currency fields in the Gateway model;

Extra: 1) Refactor README for clarity and conciseness; 2) Adjust formatting in `core/sitemaps.py` for readability.
2025-10-21 12:23:02 +03:00

22 lines
546 B
Python

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(),
}