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.
22 lines
546 B
Python
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(),
|
|
}
|