Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Sorting in Django?
Here I have:
books = books.filter(genre__title=value).order_by('title')
Answer the question
In order to leave comments, you need to log in
I was able to figure it out in a more or less adequate way:
Books = books.filter(genre__title=filt).order_by('title')
books = []
for char in "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЭЮЯ":
books.append([char, Books.filter(title__startswith=char)])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question