Hi

2008/3/25, Rocio Figueroa <[EMAIL PROTECTED]>:
>
>  Hello friends of the list, and I started to do some testing Newforms.
>  I tried to generate forms from the model automatically and Also
>  customizing forms manually (by specifying Characteristics of each
>  field).
>
>  Now my query is as follows: in a form that is Manually (by specifying
>  fields and characteristics of these) as Relations can be included, so
>  that these appear as Dropdown lists (widget = Select), for example
>  because the model:
>
>
>  class Usuario(models.Model):
>   grupo = models.ForeignKey(Grupo)
>   nombre = models.CharField(20)
>   apellido = models.CharField(30)
>   registro = models.DateTimeField()
>
>  class Grupo(models.Model):
>   nombre = models.CharField(50)
>   descripcion = models.CharField(200)
>
>  It is a form of Usuario wishes to show a drop-down list (Widget =
>  Select) containing groups available

        
You could generate the form based on the model:

UsuarioForm = forms.models.form_for_model(Usuario)

And then customize each field both at the views and the template to
put an order or special effect


Salu2


Esteban



-- 
M.Sc. Ing. Esteban Saavedra Lopez
CEO Opentelematics.Bolivia
Telefono:(+591.2) 5245959
Celular: +591 72450061
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Oruro - Bolivia
_____________________________________________
Te Invito a Visitarme y conocer mis Areas de
Investigacion
http://jesaavedra.opentelematics.org
http://esteban.profesionales.org
Si quieres chatear ICQ: 16270256
_____________________________________________

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to