mirror of
https://github.com/Rushilwiz/NewViewsNews.git
synced 2025-04-20 19:40: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="media-body">
|
||||||
<div class="article-metadata">
|
<div class="article-metadata">
|
||||||
<a class="mr-2" href="#">{{ object.author.get_full_name }}</a>
|
<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>
|
</div>
|
||||||
<p class="article-content font-weight-light">{{ article.content }}</p>
|
<p class="article-content font-weight-light">{{ article.content }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<div class="article-metadata">
|
<div class="article-metadata">
|
||||||
<a class="mr-2" href="{% url 'user-articles' article.author.username %}">{{ article.author.get_full_name }}</a>
|
<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>
|
</div>
|
||||||
<p class="article-content font-weight-light"><a class="nounderline" href="{% url 'article-detail' article.id %}">{{ article.content }}</a></p>
|
<p class="article-content font-weight-light"><a class="nounderline" href="{% url 'article-detail' article.id %}">{{ article.content }}</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,7 +32,7 @@ class ArticleListView(ListView):
|
||||||
model = Article
|
model = Article
|
||||||
template_name = "news/home.html"
|
template_name = "news/home.html"
|
||||||
context_object_name='articles'
|
context_object_name='articles'
|
||||||
ordering = ['-date_posted']
|
ordering = ['-date_published']
|
||||||
paginate_by = 8
|
paginate_by = 8
|
||||||
|
|
||||||
class UserArticleListView(ListView):
|
class UserArticleListView(ListView):
|
||||||
|
@ -43,7 +43,7 @@ class UserArticleListView(ListView):
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
user = get_object_or_404(User, username=self.kwargs.get('username'))
|
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):
|
class ArticleDetailView(DetailView):
|
||||||
model = Article
|
model = Article
|
||||||
|
|
Loading…
Reference in New Issue
Block a user