Implement CRUD for asset groups
This commit is contained in:
@@ -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.",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user