initial commit before migration
This commit is contained in:
commit
ad685a0625
75 changed files with 907 additions and 0 deletions
11
blog/views/articles_list.py
Normal file
11
blog/views/articles_list.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from django.views.generic import ListView
|
||||
from blog.models import Article
|
||||
|
||||
class ArticleList(ListView):
|
||||
preview = False
|
||||
|
||||
def get_queryset(self):
|
||||
status = 1
|
||||
if self.preview:
|
||||
status = 0
|
||||
return Article.objects.filter(status=status)
|
||||
Loading…
Add table
Add a link
Reference in a new issue