Allow disabling accounts
This commit is contained in:
@@ -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.",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user