summaryrefslogtreecommitdiff
path: root/app/trading/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/trading/models.py')
-rw-r--r--app/trading/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/trading/models.py b/app/trading/models.py
index 551a4de..40762db 100644
--- a/app/trading/models.py
+++ b/app/trading/models.py
@@ -124,6 +124,7 @@ class LuxTrade(models.Model):
)
status = models.IntegerField(choices=STATUS, default=2)
notes = models.TextField(null=True, blank=True)
+ notes_html = models.TextField(null=True, blank=True)
is_wanderer = models.BooleanField(default=True)
pl = models.FloatField(null=True)
@@ -181,6 +182,7 @@ class LuxTrade(models.Model):
self.close_date = timezone.now()
if self.status == 1 and not self.pl:
self.pl = round((self.close_price*self.shares)-(self.entry_price*self.shares), 2)
+ self.notes_html = markdown_to_html(self.notes)
super(LuxTrade, self).save()