D
D
Dauren S2016-04-08 10:56:34
Django
Dauren S, 2016-04-08 10:56:34

How to search in django?

How to make a search, the form is already there
What to write in urls.py ? and views.py

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Dauren S, 2016-04-11
@dauren101

In the form in the action write the name of the function or leave it empty
then in the function where the request is being processed
query=request.GET.get("q")
Then the logic

M
Mr_Floppy, 2016-04-08
@Mr_Floppy

1) Take
2) And do Master the filter
method or something.

I
IvanOne, 2016-04-08
@IvanOne

Use get parameters, for the view, I would use ListView to write my own get_queryset method, which, in the case of get requests, filters the selection, and I would write the form if there is a need to search for some periods or min max. But there are also solutions like https://github.com/liberation/django-elasticsearch with their own approaches.

Z
zelsky, 2016-04-08
@zelsky

django-watson
elastick search

V
Vladimir Kuts, 2016-04-08
@fox_12

django sphinx
https://habrahabr.ru/post/188242/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question