Ejemplo n.º 1
0
 def save(self, force_insert=False, force_update=False):
     import markdown2
     if self.text_markdown:
         self.text = '%s' % markdown2.markdown(self.text_markdown)
     super(Link, self).save(force_insert, force_update)
     if not settings.DEBUG:
         ping_external_urls(self.get_full_absolute_url(),
                            '%s<br>%s' % (self.url, self.text),
                            current_site_url())
         try:
             ping_google()
         except:
             pass
Ejemplo n.º 2
0
 def save(self, *args, **kwargs):
     import markdown2
     if self.text_markdown:
         self.text = markdown2.markdown(self.text_markdown)
     super(Entry, self).save(*args, **kwargs)
     if self.status == Entry.LIVE_STATUS and not settings.DEBUG:
         ping_external_urls(self.get_full_absolute_url(),
                            self.text,
                            current_site_url())
         try:
             ping_google()
         except:
             pass
Ejemplo n.º 3
0
 def save(self, force_insert=False, force_update=False, using=None):
     import markdown2
     if self.text_markdown:
         self.text = '%s' % markdown2.markdown(self.text_markdown)
         print self.text
     super(Entry, self).save(force_insert, force_update, using)
     if self.status == Entry.LIVE_STATUS and not settings.DEBUG:
         ping_external_urls(self.get_full_absolute_url(),
                            self.text,
                            current_site_url())
         try:
             ping_google()
         except:
             pass