Answer the question
In order to leave comments, you need to log in
What is the best way to filter by the first character?
Good day, gentlemen. Please advise how best to implement filtering by the first letter.
The essence of the problem: there is an alphabet, and there is a table in which definitions are written. When you click on a letter of the alphabet, definitions that begin with that letter are displayed.
I think to solve this problem in this way. Attach a URL to each letter, for example, when you click on the letter "A", a link like: was formed http://example.com/a/
,
in urls.py it will be:
url(r'^(?P<symbol>[а-я]{1})/$', TestView.as_view(), name='test'),
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question