tly the self.save() line can't possibly
> work because it will lead to infinite recursion... it's calling itself
> unconditionally every time.
>
> Slightly trickier is the self.photos.add() line. The problem here is
> that self.photos.add() calls self.save() as part of it
problem here is
that self.photos.add() calls self.save() as part of its imlpementation,
which again will lead to recursion problems. You can't add to a
many-to-many inside a save() method very easily like this. It is going
to take some redesigning of the save() path for that to be fixed
(possibly adding
I was searching for solutions but i didnt find anything.
So, here is my problem.
I have models, for example:
class Photo(models.Model, helpers.AdminOptions):
name = models.CharField(default="", null=True, blank=True,
max_length=255)
class Gallery(models.Model, helpers.AdminOptions):
3 matches
Mail list logo