def save(self, **kwargs):
        self.updated_at = timezone.now()
        if not self.secret_key:
            # Generate a random secret key
            self.secret_key = "".join(choice(letters) for _ in range(8))
        if self.is_published and self.published is None:
            self.published = timezone.now()
        super(Post, self).save(**kwargs)
dataset/ETHPy150Open pinax/pinax-blog/pinax/blog/models.py/Post.save/original