コード例 #1
0
ファイル: models.py プロジェクト: danirus/django-dress-blog
 def save(self, *args, **kwargs):
     self.abstract_markup = mark_safe(
         formatter(self.abstract, filter_name=self.markup))
     self.body_markup = mark_safe(
         formatter(self.body, filter_name=self.markup))
     if self.markup == "restructuredtext":
         self.abstract_markup = unescape_inline(self.abstract_markup)
         self.body_markup = unescape_inline(self.body_markup)
     super(Story, self).save(*args, **kwargs)
コード例 #2
0
ファイル: models.py プロジェクト: aspenlabs/blognajd
 def save(self, *args, **kwargs):
     self.abstract_markup = mark_safe(
         formatter(self.abstract, filter_name=self.markup))
     self.body_markup = mark_safe(
         formatter(self.body, filter_name=self.markup))
     if self.markup == "restructuredtext":
         self.abstract_markup = unescape_inline(self.abstract_markup)
         self.body_markup = unescape_inline(self.body_markup)
     super(Story, self).save(*args, **kwargs)
     if self.status == PUBLIC:
         try:
             ping_google()
         except:
             pass
コード例 #3
0
ファイル: models.py プロジェクト: peterayeni/easy-blog
 def save(self, *args, **kwargs):
     self.site_id = settings.SITE_ID
     self.abstract_markup = mark_safe(
         formatter(self.abstract, filter_name=self.markup))
     self.body_markup = mark_safe(
         formatter(self.body, filter_name=self.markup))
     if self.markup == "restructuredtext":
         self.abstract_markup = unescape_inline(self.abstract_markup)
         self.body_markup = unescape_inline(self.body_markup)
     super(Story, self).save(*args, **kwargs)
     if self.status == 3: # public
         blog_config = Config.get_current()
         ping_google = getattr(blog_config, "ping_google", False)
         if ping_google:
             try:
                 ping_google()
             except:
                 pass