diff --git a/news/models.py b/news/models.py
index 2c20162..4b2b513 100644
--- a/news/models.py
+++ b/news/models.py
@@ -4,6 +4,7 @@ from django.conf import settings
from django.db.models import Q
from django.utils.text import slugify
from enum import Enum
+import string
# Create your models here.
class PostState(Enum):
@@ -61,6 +62,9 @@ class Post(models.Model):
return self.title
return 'Poker Rumble - Amazing content'
+ def formatted_title(self):
+ return string.capwords(self.title)
+
class Comment(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, null=True)
post = models.ForeignKey(Post, on_delete=models.CASCADE)
diff --git a/news/templates/news/index.html b/news/templates/news/index.html
index 0e5afbf..5501efa 100644
--- a/news/templates/news/index.html
+++ b/news/templates/news/index.html
@@ -31,7 +31,7 @@