diff options
Diffstat (limited to 'app/posts/models.py')
-rw-r--r-- | app/posts/models.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/app/posts/models.py b/app/posts/models.py index 6adae3b..21dd6d5 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -32,8 +32,6 @@ from books.models import Book from taxonomy.models import TaggedItems, Category from utils.util import render_images, render_products, parse_video, markdown_to_html, extract_main_image -from lttr.models import Newsletter - def get_upload_path(self, filename): return "images/post-images/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) @@ -115,7 +113,7 @@ class Post(models.Model): if self.post_type == PostType.JRNL: return reverse('jrnl:detail', kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) if self.post_type == PostType.RANGE: - return reverse('range:detail', kwargs={"issue": self.issue, "slug": self.slug}) + return reverse('range:range-detail', kwargs={"issue": self.get_issue_str(), "slug": self.slug}) if self.post_type == PostType.FRIENDS: return reverse('friends:friends-detail', kwargs={"issue": self.get_issue_str(), "slug": self.slug}) @@ -241,14 +239,6 @@ class PostModerator(CommentModerator): return True moderator.register(Post, PostModerator) -#class PostMailing(models.Model): -# newsletter = models.ForeignKey(Newsletter, null=True, on_delete=models.SET_NULL) -# post = models.ForeignKey(Post, null=True, on_delete=models.SET_NULL) -# body_email_html = models.TextField(blank=True) -# issue = models.PositiveIntegerField() -# date_sent = models.DateTimeField(blank=True, auto_now_add=True, editable=False) - - @receiver(comment_was_posted, sender=Comment) def cache_gravatar(sender, comment, **kwargs): gravatar_exists = has_gravatar(comment.email) |