summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/trading/admin.py31
-rw-r--r--config/base_urls.py1
2 files changed, 1 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)
-"""
diff --git a/config/base_urls.py b/config/base_urls.py
index e50ee56..c749cfe 100644
--- a/config/base_urls.py
+++ b/config/base_urls.py
@@ -33,6 +33,7 @@ urlpatterns = [
#path(r'admin/income/invoice/monthlyview/<str:slug>/invoice/', DownloadMonthlyInvoiceView.as_view(), name="download-invoice"),
#path(r'admin/income/invoice/monthlyview/<str:slug>/', MonthlyInvoiceView.as_view(), name="monthly-invoice"),
path(r'admin/', admin.site.urls),
+ path(r'trading/', include('trading.urls')),
path(r'luximages/insert/', utils.views.insert_image),
path(r'luxproduct/insert/', products.views.insert_products),
path(r'feed.xml', PostRSSFeedView(),name="feed"),