Hi,

fast question: why fields = ['nombre'] instead of fields = ['name2'] ?

Best regards

On Wed, Aug 11, 2010 at 3:59 PM, refreegrata <[email protected]> wrote:
> with a model like this:
> --------------------------------------
> class Format(models.Model):
>    name1 = models.CharField(max_length=5)
>    name2 = models.CharField(max_length=5)
> --------------------------------------
>
> and a modelform like this:
> -----------------------------------------------------
> MyForm(forms.ModelForm)
>   class Meta:
>        model = Format
>        fields = ['nombre']
> -----------------------------------------------------
>
> this code will generate 2 "input text", the "input text" name1 and the
> "input text" name2. But for an unique modelform from the model
> "format" i want an "input text"(name2)  and a "label" or
> "text"(name1), because the field "name1" can only be edited in the
> first time.  In any other occasion the field "name1" most be displayed
> like an info about de field "name2"
>
> I do not know if you understand my question. basically is ¿ how i can
> supply info about a row of mi table for a specific form of my formset?
>
>
> example
> normaly my html page is
> -----------------------------------------------
> formset
> <tr>
>  <td><input text value="Alex" name="name1..." /></td><td><input text
> value="Oscar" name="name2..."/></td>
> </tr>
> <tr>
>  <td><input text value="John" name="name1..." /></td><td><input text
> value="Jack" name="name2..."/></td>
> </tr>
> .....
> -----------------------------------------------
> but i want something like this
> -----------------------------------------------
> formset
> <tr>
>  <td>"Alex" </td><td><input text value="Oscar" name="name2..."/></td>
> </tr>
> <tr>
>  <td>"John"</td><td><input text value="Jack" name="name2..."/></td>
> </tr>
> .....
> -----------------------------------------------
>
> Thanks for read
>
> P.D.: sorry for mi poor english
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to [email protected].
> 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.
>
>



-- 
Bogusław Faja
tel. (+48) 691544955

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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