Cleanup and reformat some code
This commit is contained in:
parent
a7f1f14dc7
commit
0b97ae69f5
1 changed files with 3 additions and 4 deletions
|
@ -834,8 +834,9 @@ class ContactView(FormView):
|
|||
|
||||
def blog(request):
|
||||
tags = ["digitalglarus"]
|
||||
posts = Post.objects.filter(tags__name__in=tags, publish=True).translated(get_language())
|
||||
# posts = Post.objects.filter_by_language(get_language()).filter(tags__name__in=tags, publish=True)
|
||||
posts = (Post.objects
|
||||
.filter(tags__name__in=tags, publish=True)
|
||||
.translated(get_language()))
|
||||
context = {
|
||||
'post_list': posts,
|
||||
}
|
||||
|
@ -843,8 +844,6 @@ def blog(request):
|
|||
|
||||
|
||||
def blog_detail(request, slug):
|
||||
# post = Post.objects.filter_by_language(get_language()).filter(slug=slug).first()
|
||||
|
||||
post = Post.objects.translated(get_language(), slug=slug).first()
|
||||
if post is None:
|
||||
raise Http404()
|
||||
|
|
Loading…
Reference in a new issue