news_objects -> article_objects

This commit is contained in:
2020-06-16 17:25:08 +00:00
parent 24e553f241
commit ab86c556f0
3 changed files with 3 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ from posts.models import Post
def index(request):
posts=deque(Post.news_objects.all())
posts=deque(Post.article_objects.all())
l=len(posts)
def get_tags(lst):
for p in lst:

View File

@@ -100,7 +100,7 @@ class Post(models.Model):
# Managers
objects = PostManager()
news_objects = ArticleManager()
article_objects = ArticleManager()
def get_tags(self):
"""Returns assigned tags as a comma seperated list."""

View File

@@ -15,7 +15,7 @@ from django.utils import timezone
from django.http import JsonResponse
def get_next_dict():
posts=Post.news_objects.order_by('-public_date').values('slug')
posts=Post.article_objects.order_by('-public_date').values('slug')
print(posts)
d={}
print(d)