diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/lttr/models.py | 6 | ||||
-rw-r--r-- | app/posts/admin.py | 2 | ||||
-rw-r--r-- | app/posts/migrations/0020_remove_post_issue.py | 17 | ||||
-rw-r--r-- | app/posts/models.py | 9 | ||||
-rw-r--r-- | app/trading/templates/trading/base.html | 2 | ||||
-rw-r--r-- | app/trading/templates/trading/list.html | 3 |
6 files changed, 22 insertions, 17 deletions
diff --git a/app/lttr/models.py b/app/lttr/models.py index b4d1506..22341fa 100644 --- a/app/lttr/models.py +++ b/app/lttr/models.py @@ -249,16 +249,12 @@ class NewsletterMailing(models.Model): self.body_markdown = self.post.body_markdown self.pub_date = self.post.pub_date self.featured_image = self.post.featured_image - if self.post.issue: - self.issue = self.post.issue - else: - self.issue = NewsletterMailing.objects.filter(newsletter=self.newsletter).latest().issue+1 + self.issue = NewsletterMailing.objects.filter(newsletter=self.newsletter).latest().issue+1 if not created: md = render_images(self.body_markdown) self.body_html = markdown_to_html(md) self.body_email_html = markdown_to_emailhtml(self.body_html) self.date_created = timezone.now() - self.issue = self.post.issue if created and not self.featured_image: self.featured_image = LuxImage.objects.latest() super(NewsletterMailing, self).save() diff --git a/app/posts/admin.py b/app/posts/admin.py index 8346c62..22c7955 100644 --- a/app/posts/admin.py +++ b/app/posts/admin.py @@ -45,7 +45,7 @@ class PostAdmin(OSMGeoAdmin): ('title', 'short_title'), 'subtitle', 'body_markdown', - ('pub_date', 'status', 'post_type', 'issue'), + ('pub_date', 'status', 'post_type'), ('slug', 'enable_comments',), 'point', 'dek', diff --git a/app/posts/migrations/0020_remove_post_issue.py b/app/posts/migrations/0020_remove_post_issue.py new file mode 100644 index 0000000..aa5695c --- /dev/null +++ b/app/posts/migrations/0020_remove_post_issue.py @@ -0,0 +1,17 @@ +# Generated by Django 4.0.6 on 2022-07-23 16:29 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('posts', '0019_auto_20210323_2155'), + ] + + operations = [ + migrations.RemoveField( + model_name='post', + name='issue', + ), + ] diff --git a/app/posts/models.py b/app/posts/models.py index 21dd6d5..4616ad5 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -94,7 +94,6 @@ class Post(models.Model): originally_published_by_url = models.CharField(max_length=400, null=True, blank=True) field_notes = models.ManyToManyField('self', blank=True, symmetrical=False, limit_choices_to = {'post_type': PostType.FIELD_NOTE}) books = models.ManyToManyField(Book, blank=True) - issue = models.PositiveIntegerField(null=True) class Meta: ordering = ('-pub_date',) @@ -126,14 +125,6 @@ class Post(models.Model): def get_content_type(self): return ContentType.objects.get(app_label="posts", model="post") - def get_issue_str(self): - issue = self.issue - if self.issue < 100: - issue = "0%s" % self.issue - if self.issue < 10: - issue = "00%s" % self.issue - return issue - @property def get_previous_published(self): return self.get_previous_by_pub_date(status__exact=1,post_type=self.post_type) diff --git a/app/trading/templates/trading/base.html b/app/trading/templates/trading/base.html index 9b9e6b0..ae634a4 100644 --- a/app/trading/templates/trading/base.html +++ b/app/trading/templates/trading/base.html @@ -16,7 +16,7 @@ <span class="nav-item"><a href="{% url 'luxtrade:list' %}">Home</a></span> <span class="nav-item"><a href="{% url 'luxtrade:testtrade' %}">Test Trade</a></span> <span class="nav-item"><a href="{% url 'luxtrade:option-create' %}">Test Options</a></span> - <span class="nav-item"><a href="https://wandererfinancial.com/{% now 'n-j-y'%}-todays-market/" target="_blank">Wanderer</a></span> + <span class="nav-item"><a href="https://member.wandererfinancial.com/{% now 'n-j-y'%}-todays-market/" target="_blank">Wanderer</a></span> <span class="nav-item"><a href="https://www.tradingview.com/chart/1a1NjVtp/" target="_blank">Trading View</a></span> <span class="nav-item"><a href="https://trade.tastyworks.com/index.html#/portfolioPage" target="_blank">Tastyworks</a></span> <span class="nav-item"><a href="https://client.schwab.com/Areas/Trade/Stocks/Entry.aspx?" target="_blank">Schwab New Trade</a></span> diff --git a/app/trading/templates/trading/list.html b/app/trading/templates/trading/list.html index 3063533..1593caa 100644 --- a/app/trading/templates/trading/list.html +++ b/app/trading/templates/trading/list.html @@ -1,7 +1,7 @@ {% extends 'trading/base.html' %} {% block content %} - <h3>Options</h3> + {%comment%}<h3>Options</h3> <table class="options"> <thead> <tr> @@ -78,6 +78,7 @@ <td></td> </tr> </table> + {% endcomment %} {% comment %} <h3>Options Trades</h3> <table class="options"> |