summaryrefslogtreecommitdiff
path: root/app/blog/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/blog/models.py')
-rw-r--r--app/blog/models.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/blog/models.py b/app/blog/models.py
index 3d1ae30..61ac407 100644
--- a/app/blog/models.py
+++ b/app/blog/models.py
@@ -27,7 +27,6 @@ class Entry(models.Model):
status = models.IntegerField(choices=PUB_STATUS, default=0)
meta_description = models.CharField(max_length=256, null=True, blank=True)
tags = TaggableManager(through=TaggedItems, blank=True, help_text='Topics Covered')
- featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True)
category = models.ForeignKey(Category, on_delete=models.CASCADE, null=True, blank=True)
class Meta:
@@ -39,7 +38,7 @@ class Entry(models.Model):
return self.title
def get_absolute_url(self):
- return reverse('essays:detail', kwargs={"slug": self.slug})
+ return reverse("blog:detail", kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug})
def comment_period_open(self):
return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date