@@ -39,27 +39,27 @@ class PressRelease(models.Model, bsoup.SoupModelMixin):
# question: does datetime.now() do a syscall each time is it called?
def is_in_past_month(self):
# This function is deprecated. Use the date_within template
# filter instead (example in conservancy/templates/frontpage.html)
return self.pub_date > (datetime.now() - timedelta(days=30))
def save(self):
if settings.CONSERVANCY_DEVEL or True:
super(PressRelease, self).save()
return
blog_name = 'Software Freedom Law Center News'
blog_url = 'http://www.softwarefreedom.org/news/'
post_url = ('http://www.softwarefreedom.org'
blog_name = 'Software Freedom Conservancy News'
blog_url = 'https://www.sfconservancy.org/news/'
post_url = ('https://www.sfconservancy.org'
+ self.get_absolute_url())
import xmlrpclib
# Ping Technorati
j = xmlrpclib.Server('http://rpc.technorati.com/rpc/ping')
reply = j.weblogUpdates.ping(blog_name, blog_url)
# Ping Google Blog Search
j = xmlrpclib.Server('http://blogsearch.google.com/ping/RPC2')
reply = j.weblogUpdates.ping(blog_name, blog_url, post_url)