Thanks guys :)
On Wed, Jul 25, 2012 at 6:49 PM, Mattias Linnap wrote:
> It is possible to override the save() method in a model to add
> functionality:
>
> https://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods
>
> Another choice would be to register a receiver for the
It is possible to override the save() method in a model to add functionality:
https://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods
Another choice would be to register a receiver for the pre_save or
post_save signals:
https://docs.djangoproject.com/en/dev/ref/models/inst
On Wed, Jul 25, 2012 at 12:34 PM, Sithembewena Lloyd Dube wrote:
> Hi all,
>
> I have the following code:
>
> class Points(models.Model):
> blah blah
>
> class TrainingSession(models.Model):
> confirmed = models.BooleanField()
> points = models.ForeignKey(Points, null=True, blank
Hi all,
I have the following code:
class Points(models.Model):
blah blah
class TrainingSession(models.Model):
confirmed = models.BooleanField()
points = models.ForeignKey(Points, null=True, blank=True)
When a training session is saved, if confirmed is True I wish to create and
4 matches
Mail list logo