示例#1
0
 def touch(self):
     update = {
         "_changed": self.is_changed(),
         "_hidden": self.is_hidden(),
         "_short_html": None,
     }
     Chunk.objects.filter(pk=self.pk).update(**update)
     refresh_instance(self)
示例#2
0
 def touch(self):
     update = {
         "_changed": self.is_changed(),
         "_short_html": None,
         "_new_publishable": self.is_new_publishable(),
         "_published": self.is_published(),
     }
     Image.objects.filter(pk=self.pk).update(**update)
     refresh_instance(self)
示例#3
0
    def touch(self):
        # this should only really be done when text or publishable status changes
        book_content_updated.delay(self)

        update = {
            "_new_publishable": self.is_new_publishable(),
            "_published": self.is_published(),
            "_single": self.is_single(),
            "_on_track": self.get_on_track(),
            "_short_html": None,
        }
        Book.objects.filter(pk=self.pk).update(**update)
        refresh_instance(self)