* giovedì 08 febbraio 2007, alle 07:17, Russell Keith-Magee wrote :
> Ok - this is saving a form created from a model. Since your model
> contains a m2m field, the form representing that model will have an
> m2m widget, and when you save() the form, the m2m relation on the
> object will be modifie
On 2/7/07, Antonio <[EMAIL PROTECTED]> wrote:
>
> * mercoledì 07 febbraio 2007, alle 11:27, Russell Keith-Magee wrote :
> > > but the data are added also when I update the Previsione ...
> > > searching on group archive, I think I must implement a 'save' method
> > > into the Previsione class ...
* mercoledì 07 febbraio 2007, alle 11:27, Russell Keith-Magee wrote :
> > but the data are added also when I update the Previsione ...
> > searching on group archive, I think I must implement a 'save' method
> > into the Previsione class ... is correct ?
>
> I'm not sure I understand what you're
On 2/7/07, Antonio <[EMAIL PROTECTED]> wrote:
>
> * martedì 06 febbraio 2007, alle 20:10, Russell Keith-Magee wrote :
> > data.rims.add(req.POST.getlist('rims'))
Oops - sorry - missed a small, but very important bit - You need to
roll out the list as arguments. Ordinarily, the usage of add() woul
* martedì 06 febbraio 2007, alle 20:10, Russell Keith-Magee wrote :
for the moment, I've resolved this way:
if req.method == 'POST':
myform = nf.models.form_for_model(Previsione)(req.POST)
if myform.is_valid():
dati = myform.save(commit=False)
sa
* martedì 06 febbraio 2007, alle 20:10, Russell Keith-Magee wrote :
> data.rims.add(req.POST.getlist('rims'))
*
Exception Type: TypeError
Exception Value: list objects are unhashable
*
I've try with:
for newrim in req.POST.getlist('rims'):
dati.rims.add(n
On 2/6/07, Antonio <[EMAIL PROTECTED]> wrote:
> Hi all,
> I have a class with a many2many field:
...
> but when I update the data the old rims are deleted and the new inserted ...
> is
> possible to UPDATE the rims data ? cioe', is possible to leave unchanged the
> rims data if are the same ?
d
Hi all,
I have a class with a many2many field:
class Previsione(models.Model):
nave = models.CharField(maxlength=50)
data_manovra = models.DateField()
h_inizio = models.TimeField()
rims = models.ManyToManyField(Rim)
into the views.py I use this code to save the su
8 matches
Mail list logo