Benjamin Slavin napisaĆ(a): > I'm currently trying to perform an action the first time an object is > saved for a model that includes a OneToOneField. > > Normally I'd use the old "check self.id before save" approach, but > models with OneToOneFields don't provide that option (they don't have > a self.id variable, and self._get_pk_val returns a defined value even > before the first save). > > Anyone here have a recommendation as to how I could do this?
I had similar problem recently and I received an advice to do such things in manipulator, not in model code. -- Jarek Zgoda "We read Knuth so you don't have to." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---