Hello,
What you must do is to use Javascript and AJAX, to have the desired
behavior, I guess would be for onchange event. By the way it is therefore
desirable to handle the tables in the following format

<Table>
   <Thead>
        <! - Header here ->
   </ Thead>
   <Tbody id = "content">
   </ Tbody>
</ Table>

regards

2016-05-03 8:06 GMT-03:00 <[email protected]>:

> So i have a select list and a table,and i want to show only the data that
> corresponds the selected item.
>
> This is my index.html file
>
> <select title="my_owners">
>     <option>Owners</option>
>     <option selected>-------------------</option>
>     {% for owner in owners %}
>         <option value="owner"> {{ owner.person_id }} {{ owner.first_name }} 
> {{ owner.last_name }}</option>
>     {% endfor %}
> </select>
> <br/> <br/>
> <table border="1">
>     <tr>
>         <td>Id</td>
>         <td>Space</td>
>         <td>City</td>
>         <td>Street</td>
>         <td>Price</td>
>         <td>Purpose</td>
>     </tr>
>
>
>     {% for info in information %}
>
>         <tr>
>         <td>{{ info.owner_id }}</td>
>         <td>{{ info.space }}</td>
>         <td>{{ info.city }}</td>
>         <td>{{ info.street }}</td>
>         <td>{{ info.price }}</td>
>         <td>{{ info.get_purpose }}</td>
>     {% endfor %}
>
>     </tr>
>
> </table>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e3502e4e-c58b-46e7-8201-9b07edcca7dc%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e3502e4e-c58b-46e7-8201-9b07edcca7dc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Ricardo Daniel Quiroga

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO2-wHaaGX5LTa%3D_WteSoB8-tpTxvvUWVCjHUcBrutf79WOAXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to