Implement CRUD for asset groups

This commit is contained in:
2023-02-10 07:20:19 +00:00
parent e00cdc906e
commit 72055181bc
7 changed files with 237 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ from django.forms import ModelForm
from .models import (
Account,
AssetGroup,
Hook,
NotificationSettings,
RiskModel,
@@ -326,3 +327,18 @@ class RiskModelForm(RestrictedFormMixin, ModelForm):
"max_open_trades": "The maximum number of open trades.",
"max_open_trades_per_symbol": "The maximum number of open trades per symbol.",
}
class AssetGroupForm(RestrictedFormMixin, ModelForm):
class Meta:
model = AssetGroup
fields = (
"name",
"description",
"account",
)
help_texts = {
"name": "Name of the asset group. Informational only.",
"description": "Description of the asset group. Informational only.",
"account": "Account to pull assets from.",
}