summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2021-07-14 09:38:47 -0400
committerluxagraf <sng@luxagraf.net>2021-07-14 09:38:47 -0400
commit335896b6f04047e369b079e45a2c949e8320b469 (patch)
treea490dfe6ffe7df20eed0f4e9812e0490c2b486ce /app
parente3a78ecf5a3a84afb91e8f338e2aa8f2c28a35fa (diff)
trad: removed Markdown requirement from admin, added base_urls
Diffstat (limited to 'app')
-rw-r--r--app/trading/admin.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/app/trading/admin.py b/app/trading/admin.py
index f95a272..8b1435c 100644
--- a/app/trading/admin.py
+++ b/app/trading/admin.py
@@ -1,5 +1,4 @@
from django.contrib import admin
-from markdownx.widgets import AdminMarkdownxWidget
from django.db import models
from .models import TradeJrnl, OptionsTrade
from utils.widgets import AdminImageWidget, LGEntryForm
@@ -8,9 +7,6 @@ from utils.widgets import AdminImageWidget, LGEntryForm
@admin.register(TradeJrnl)
class TradingJrnlAdmin(admin.ModelAdmin):
form = LGEntryForm
- formfield_overrides = {
- models.TextField: {'widget': AdminMarkdownxWidget},
- }
class Media:
js = ('image-loader.js', 'next-prev-links.js')
css = {
@@ -28,30 +24,3 @@ class OptionsTradeAdmin(admin.ModelAdmin):
"all": ("my_styles.css",)
}
-"""
- date = models.DateTimeField()
- symbol = models.ForeignKey(Ticker, null=True, on_delete=models.SET_NULL)
- TRANSACTION_CODE = (
- ('Trade', 'Trade'),
- )
- transaction_code = models.CharField(choices=TRANSACTION_CODE, max_length=25)
- TRANSACTION_SUBCODE = (
- ('Buy to Open', 'Buy to Open'),
- ('Sell to Open', 'Sell to Open'),
- ('Sell to Close', 'Sell to Close'),
- )
- transaction_subcode = models.CharField(choices=TRANSACTION_SUBCODE, max_length=25)
- open_close = models.CharField(choices=OPEN_CLOSE, max_length=5)
- quantity = models.FloatField()
- expiration_date = models.DateTimeField()
- strike = models.FloatField()
- CALL_PUT = (
- ('C', 'Call'),
- ('P', 'Put'),
- )
- call_put = models.CharField(choices=CALL_PUT, max_length=4)
- price = models.FloatField()
- fees = models.FloatField()
- amount = models.FloatField()
- description = models.TextField(blank=True)
-"""