[Gfoss] geodjango inserire campo geom da form
Luca Delucchi
lucadeluge a gmail.com
Gio 2 Dic 2010 11:09:20 CET
2010/11/26 Paolo Corti <pcorti a gmail.com>:
> Caro Luca
> come spiegato BENE ;) sulla documentazione di Django [1] (leggi la nota):
>
eh grazie, me l'ero perso!!
> "If you specify fields or exclude when creating a form with ModelForm,
> then the fields that are not in the resulting form will not be set by
> the form's save() method. Django will prevent any attempt to save an
> incomplete model, so if the model does not allow the missing fields to
> be empty, and does not provide a default value for the missing fields,
> any attempt to save() a ModelForm with missing fields will fail. To
> avoid this failure, you must instantiate your model with initial
> values for the missing, but required fields..."
>
> pertanto puoi usare uno dei due modi suggeriti, ad es modificando
> cosi' la tua view, vedrai che ti funziona:
si si funziona grazie mille!!
> ciao
> P
>
ciao
Luca
Maggiori informazioni sulla lista
Gfoss