F
F
Forque2015-08-09 21:54:21
Django
Forque, 2015-08-09 21:54:21

How to implement search and select option in Django?

There is a web application. Implemented search by name and surname in the database. The results are displayed on the page.
How to get the ID of one of the options? Can I somehow pass from the function where the search was implemented or can I get it from the page?
task tracker. We search for implementers and add one or more to an existing project.
I decided to display the search result on the page first. Result brought out.
Now I do not know how to get the implementer ID to add to the M2M connection.
I hope this makes more
sense. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maxclax, 2015-08-13
@maxclax

Have you deduced a list of objects, and you need to get an ID for each? Through obj.pk does not come out? Or nada in a linked table via obj.name_set.pk?

F
Forque, 2015-08-13
@Forque

Yes, thank you, I already received it through name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question