Implement configuration of trading times

This commit is contained in:
2022-11-25 18:01:34 +00:00
parent bcb3272064
commit baa8e4fead
9 changed files with 275 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.forms import ModelForm
from .models import Account, Hook, Strategy, Trade, User
from .models import Account, Hook, Strategy, Trade, TradingTime, User
# Create your forms here.
@@ -96,3 +96,16 @@ class TradeForm(ModelForm):
"take_profit",
"direction",
)
class TradingTimeForm(ModelForm):
class Meta:
model = TradingTime
fields = (
"name",
"description",
"start_day",
"start_time",
"end_day",
"end_time",
)