> I don't think there's a clean solution to this (as far as making the
> Admin work with it). I don't think the admin can make use of a custom
> manipulator without hackish code.
Bummer, I figured the best I could hope for would be to replace the
automatic manipulators to do my bidding after they
On Oct 12, 1:04 pm, Adam Endicott <[EMAIL PROTECTED]> wrote:
> > How about something along these lines (a lazy initialization pattern):
>
> Well, the point of saving that boolean was so I could do database
> queries on it (MyModel.objects.filter(has_m2m_thing=True)). That
> wouldn't really work
> How about something along these lines (a lazy initialization pattern):
Well, the point of saving that boolean was so I could do database
queries on it (MyModel.objects.filter(has_m2m_thing=True)). That
wouldn't really work with this lazy initialization pattern, unless I'm
missing something. Sor
> Sure. I'm trying to set a boolean property on the object based on the
> existence (or absence) of a ManyToMany relationship. So I originally
> thought something like:
>
> def save(self):
> self.has_m2m_thing = bool(self.m2m_relation.count())
> super(MyModel, self).save()
>
> This works f
> Can you describe generally what you are trying to update in the parent
> object when its ManyToMany relationships are changed. Perhaps there's
> a way to solve your specific problem without requiring more general
> purpose solutions (like Custom Manipulators).
Sure. I'm trying to set a boolean
On Oct 11, 6:54 pm, Adam Endicott <[EMAIL PROTECTED]> wrote:
> I've got an app where I'd like to set some properties in an object's
> save method based on ManyToMany relationships.
Can you describe generally what you are trying to update in the parent
object when its ManyToMany relationships ar
6 matches
Mail list logo