Implement configuration of trading times
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user