mirror of
https://github.com/Rushilwiz/NewViewsNews.git
synced 2025-04-19 02:50:16 -04:00
lol forgot to save
This commit is contained in:
parent
b6891f1321
commit
ffd3809fa2
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user