File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,17 +24,9 @@ def get_queryset(self, **kwargs):
2424 return Article .objects .get_published ()
2525
2626
27- class DraftsListView (LoginRequiredMixin , ListView ):
28- """Basic ListView implementation to call the drafts articles list."""
29- model = Article
30- paginate_by = 15
31- context_object_name = "articles"
32-
33- def get_context_data (self , * args , ** kwargs ):
34- context = super ().get_context_data (* args , ** kwargs )
35- context ['popular_tags' ] = Article .get_counted_tags ()
36- return context
37-
27+ class DraftsListView (ArticlesListView ):
28+ """Overriding the original implementation to call the drafts articles
29+ list."""
3830 def get_queryset (self , ** kwargs ):
3931 return Article .objects .get_drafts ()
4032
Original file line number Diff line number Diff line change @@ -33,9 +33,10 @@ <h1 class="mt-4">{{ article.title|title }}</h1>
3333 {% empty %}
3434 < img class ="img-fluid rounded " src ="http://placehold.it/900x300 " alt ="Card Image ">
3535 {% endthumbnail %}
36+ <!-- <img src="{{ MEDIA_URL }}{{ article.image }}" lt="{% trans 'Featured Image' %}" class="card-img-top"> -->
3637 < hr >
3738 <!-- Post Content -->
38- < p > {{ article.content }}</ p >
39+ < p class =" card-text " > {{ article.content }}</ p >
3940 < hr >
4041
4142 <!-- Comments Form -->
You can’t perform that action at this time.
0 commit comments