Thank you Rajesh, I didn't knew that.
I will try your solution.
Thanks!
On 11 jul, 23:16, RajeshD <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > Anyone knows where the problem is?
>
> If you are using the Admin app to populate tags then the automatic
> manipulators first call Receta.save() followed by
Hi,
> Anyone knows where the problem is?
If you are using the Admin app to populate tags then the automatic
manipulators first call Receta.save() followed by setting the models
M2M field. This wipes out your changes to etiquetas inside
Receta.save()
One solution is to add get_tags and set_tags
Thank you Collin, I tried that before posting in this group but the
same thing happened: I get no errors when saving but Tags still remain
not asociated with Receta.
class Receta(models.Model):
def save(self):
from django.template.defaultfilters import slugify
tags = se
A ManyToManyField is not a list to be replaced - add the new tags
directly to etiquetas using the .add() method on it.
On Jul 10, 9:34 am, zenx <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to get a list of tags separated by a comma and be able to
> save them as related objects for the curren
Hi,
I would like to get a list of tags separated by a comma and be able to
save them as related objects for the current object. Currently I have
this code. When saving a Receta object it creates the tags objects if
they doesn't exist yet and it should save the relations between Tags
and Receta, b
5 matches
Mail list logo