Fixes: (1) Removed all `# type: ignore` annotations across the codebase; (2) Fixed usage of Django Model methods by eliminating unnecessary `# type: ignore` directives; (3) Adjusted usage of functions like `get()` to align with method expectations, removing incorrect comments; Extra: (1) Deleted `pyrightconfig.json` as part of migration to a stricter type-checked environment; (2) Minor code cleanup, including formatting changes and refactoring import statements in adherence to PEP8 recommendations.
22 lines
506 B
Python
22 lines
506 B
Python
from django import forms
|
|
|
|
from engine.core.widgets import JSONTableWidget
|
|
from engine.payments.models import Gateway, Transaction
|
|
|
|
|
|
class TransactionForm(forms.ModelForm):
|
|
class Meta:
|
|
model = Transaction
|
|
fields = "__all__"
|
|
widgets = {
|
|
"process": JSONTableWidget(),
|
|
}
|
|
|
|
|
|
class GatewayForm(forms.ModelForm):
|
|
class Meta:
|
|
model = Gateway
|
|
fields = "__all__"
|
|
widgets = {
|
|
"integration_variables": JSONTableWidget(),
|
|
}
|