Add feather icons and use them in the global nav, add RSS
[styx.blog] / core / models.py
index 16fe65d..6537848 100644 (file)
@@ -2,6 +2,7 @@ import re
 
 from django.contrib.auth.models import User
 from django.db import models
+from django.urls import reverse
 from django.utils.safestring import mark_safe
 
 import commonmark
@@ -16,6 +17,9 @@ class Post(models.Model):
     def __str__(self):
         return self.title
 
+    def get_absolute_url(self):
+        return reverse('post-detail', kwargs={ 'slug': self.slug })
+
     @property
     def body_html(self):
         return mark_safe(commonmark.commonmark(self.body_markdown))