On May 20, 5:28 pm, luke lukes wrote:
> thanks Paul and DR, your solution worked. anyway now i have a problem with
> the validation of that form (her's the view):
(snip)
Sorry, your code's indentation get messed up so it's hard to tell
where the problem ise exactly.
thanks Paul and DR, your solution worked. anyway now i have a problem with
the validation of that form (her's the view):
*def anagrafica_save(request):*
*if request.method == 'POST':*
*form = AnagraficaForm(request.POST)*
*if'idsogg' in request.POST:*
*soggetto =
I think you need self.fields[field_name] = your new field.
Paul
On May 20, 2012, at 7:49 AM, luke lukes wrote:
> Hi. already tried this way --> fields are instantiated
> () but are not
> rendered in the template...
>
> Il giorno domenica 20 maggio 2012 03:25:36 UTC+2,
On Sunday, 20 May 2012 12:49:28 UTC+1, luke lukes wrote:
>
> Hi. already tried this way --> fields are instantiated
> () but are not
> rendered in the template...
>
>>
>> You should be assigning your new fields to `self.fields['fieldname']`,
not `self.fieldname`.
--
DR.
--
You received this
Il giorno domenica 20 maggio 2012 13:49:28 UTC+2, luke lukes ha scritto:
>
> Hi. already tried this way --> fields are instantiated
> () but are not
> rendered in the template...
>
> Il giorno domenica 20 maggio 2012 03:25:36 UTC+2, somecallitblues ha
> scritto:
>>
>> Hey Luke,
>>
>> I don't
Hi. already tried this way --> fields are instantiated
() but are not
rendered in the template...
Il giorno domenica 20 maggio 2012 03:25:36 UTC+2, somecallitblues ha
scritto:
>
> Hey Luke,
>
> I don't think you need to return anything, especially not a super class.
>
> Try this
Hey Luke,
I don't think you need to return anything, especially not a super class.
Try this http://dpaste.com/hold/750356/
Cheers,
-m
On 20 May 2012 10:06, luke lukes wrote:
> hi everyone. i need to overrid the constructor of a form: if i have some
> value in input,
hi everyone. i need to overrid the constructor of a form: if i have some
value in input, some fields has to be ChoiceField, otherwise they have to
be CharField. here's the code:
http://dpaste.com/750343/
but this way doesn't work. even if i declare fields before constructor as
CharField and
8 matches
Mail list logo