Glebb escreveu:
> How about
> <option value="{{i.id}}">
>
> Now the id_tecnico should have the value of your
persons id in your
> view.
Hi Glebb,
that was it. Thank you very much!
Luis
>
> On Sep 28, 3:16 pm, "luisl... gmail.com" <luisl... gmail.com> wrote:
> > Hi,
> >
> > I'm building a page where a person has to choose
who is to perform an
> > action. The 'who' comes from the 'auth_user'
table.
> >
> > <select name="id_tecnico"
size="1">
> > {% for i in inst %}
> > <option>
> > {{ i.first_name|lower|capfirst }} {{
i.last_name|lower|capfirst }}
> > {{ i.id }}
> > {% endfor %}
> > </select>
> >
> > I would like first_name and last_name to appear on
the select box, but
> > not the id field.
> >
> > But I would like to have the id returned to the
view, as it is the
> > primary key of users. Is there a way to do this
(in django/html)?
> >
> > Otherwise, the only solution I can see is to
return first_name and
> > last_name only to the view, and try to find the id
of that user from
> > the table. Is this the way to go?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|