news_objects -> article_objects
This commit is contained in:
@@ -5,7 +5,7 @@ from posts.models import Post
|
|||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
posts=deque(Post.news_objects.all())
|
posts=deque(Post.article_objects.all())
|
||||||
l=len(posts)
|
l=len(posts)
|
||||||
def get_tags(lst):
|
def get_tags(lst):
|
||||||
for p in lst:
|
for p in lst:
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ class Post(models.Model):
|
|||||||
|
|
||||||
# Managers
|
# Managers
|
||||||
objects = PostManager()
|
objects = PostManager()
|
||||||
news_objects = ArticleManager()
|
article_objects = ArticleManager()
|
||||||
|
|
||||||
def get_tags(self):
|
def get_tags(self):
|
||||||
"""Returns assigned tags as a comma seperated list."""
|
"""Returns assigned tags as a comma seperated list."""
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from django.utils import timezone
|
|||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
|
|
||||||
def get_next_dict():
|
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)
|
print(posts)
|
||||||
d={}
|
d={}
|
||||||
print(d)
|
print(d)
|
||||||
|
|||||||
Reference in New Issue
Block a user