From ffd3809fa22c68d6cf3aecf9aa4a5daa00578248 Mon Sep 17 00:00:00 2001
From: Rushil Umaretiya <rushilwiz@gmail.com>
Date: Sat, 15 Aug 2020 05:41:13 -0400
Subject: [PATCH] lol forgot to save

---
 news/templates/news/article_confirm_delete.html | 2 +-
 news/templates/news/home.html                   | 2 +-
 news/views.py                                   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/news/templates/news/article_confirm_delete.html b/news/templates/news/article_confirm_delete.html
index 2ba177b..7bfb69b 100644
--- a/news/templates/news/article_confirm_delete.html
+++ b/news/templates/news/article_confirm_delete.html
@@ -11,7 +11,7 @@
         <div class="media-body">
           <div class="article-metadata">
             <a class="mr-2" href="#">{{ object.author.get_full_name }}</a>
-            <small class="text-muted">@{{ object.author }} · {{ object.date_posted }}</small>
+            <small class="text-muted">@{{ object.author }} · {{ object.date_published }}</small>
           </div>
           <p class="article-content font-weight-light">{{ article.content }}</p>
         </div>
diff --git a/news/templates/news/home.html b/news/templates/news/home.html
index c80f3ea..9459fa0 100644
--- a/news/templates/news/home.html
+++ b/news/templates/news/home.html
@@ -6,7 +6,7 @@
     <div class="media-body">
       <div class="article-metadata">
         <a class="mr-2" href="{% url 'user-articles' article.author.username %}">{{ article.author.get_full_name }}</a>
-        <small class="text-muted">@{{ article.author }} · {{ article.date_posted }}</small>
+        <small class="text-muted">@{{ article.author }} · {{ article.date_published }}</small>
       </div>
       <p class="article-content font-weight-light"><a class="nounderline" href="{% url 'article-detail' article.id %}">{{ article.content }}</a></p>
     </div>
diff --git a/news/views.py b/news/views.py
index 506201c..7f012b8 100644
--- a/news/views.py
+++ b/news/views.py
@@ -32,7 +32,7 @@ class ArticleListView(ListView):
     model = Article
     template_name = "news/home.html"
     context_object_name='articles'
-    ordering = ['-date_posted']
+    ordering = ['-date_published']
     paginate_by = 8
 
 class UserArticleListView(ListView):
@@ -43,7 +43,7 @@ class UserArticleListView(ListView):
 
     def get_queryset(self):
         user = get_object_or_404(User, username=self.kwargs.get('username'))
-        return Article.objects.filter(author=user).order_by('-date_posted')
+        return Article.objects.filter(author=user).order_by('-date_published')
 
 class ArticleDetailView(DetailView):
     model = Article