Skip to content

Commit

Permalink
Convert images to .webp
Browse files Browse the repository at this point in the history
  • Loading branch information
diemuzi committed Jan 10, 2020
1 parent 3e3a62a commit 72d1b00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion diemuzi/blog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ def categories():
:return: list
"""

return Blog.objects.values('category__name', 'category__slug').annotate(count=models.Count('pk'))
return Blog.objects.select_related('category').prefetch_related('category').values('category__slug',
'category__name').annotate(
count=models.Count('pk'))

@staticmethod
def choices():
Expand Down
Binary file added diemuzi/blog/static/blog/images/cat_sulky.webp
Binary file not shown.

0 comments on commit 72d1b00

Please sign in to comment.