Allow disabling accounts

This commit is contained in:
2023-01-01 15:46:40 +00:00
parent a18c150fe2
commit b31a2d1464
6 changed files with 40 additions and 3 deletions

View File

@@ -111,13 +111,22 @@ class SignalForm(RestrictedFormMixin, ModelForm):
class AccountForm(RestrictedFormMixin, ModelForm):
class Meta:
model = Account
fields = ("name", "exchange", "api_key", "api_secret", "sandbox", "risk_model")
fields = (
"name",
"exchange",
"api_key",
"api_secret",
"sandbox",
"enabled",
"risk_model",
)
help_texts = {
"name": "Name of the account. Informational only.",
"exchange": "The exchange to use for this account.",
"api_key": "The API key or username for the account.",
"api_secret": "The API secret or password/token for the account.",
"sandbox": "Whether to use the sandbox/demo or not.",
"enabled": "Whether the account is enabled.",
"risk_model": "The risk model to use for this account.",
}