Changeset - c564f155115f
[Not reviewed]
0 3 0
Bradley Kuhn (bkuhn) - 22 months ago 2020-01-24 17:26:59
bkuhn@ebb.org
Correct & update hard-coded domain names from legacy codebase.
3 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
www/conservancy/apps/blog/models.py
Show inline comments
...
 
@@ -51,27 +51,27 @@ class Entry(models.Model, bsoup.SoupModelMixin):
 

	
 
    def is_recent(self):
 
        return self.pub_date > (datetime.now() - timedelta(days=30))
 
        # question: does datetime.now() do a syscall each time is it called?
 

	
 
    # Ping google blogs and technorati.  Taken from
 
    # http://blog.foozia.com/blog/2007/apr/21/ping-technorati-your-django-blog-using-xml-rpc/
 
    def save(self):
 
        if settings.CONSERVANCY_DEVEL or True: # "or True" means it is disabled always
 
            super(Entry, self).save()
 
            return
 

	
 
        blog_name = 'Software Freedom Law Center Blog'
 
        blog_url =  'http://www.softwarefreedom.org/blog/'
 
        post_url = ('http://www.softwarefreedom.org'
 
        blog_name = 'Software Freedom Conservancy Blog'
 
        blog_url =  'http://www.sfconservancy.org/blog/'
 
        post_url = ('http://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)
 

	
www/conservancy/apps/news/models.py
Show inline comments
...
 
@@ -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)
 

	
www/conservancy/templates/feeds/blog_description.html
Show inline comments
 
<p><i>Blog post by <strong>{{ obj.author.formal_name }}</strong>.  Please email any comments on this entry to <a href="mailto:{{ obj.author.username }}@softwarefreedom.org">&lt;{{ obj.author.username }}@sfconservancy.org&gt;</a>.</i></p>
 
<p><i>Blog post by <strong>{{ obj.author.formal_name }}</strong>.  Please email any comments on this entry to <a href="mailto:{{ obj.author.username }}@sfconservancy.org">&lt;{{ obj.author.username }}@sfconservancy.org&gt;</a>.</i></p>
 
{{ obj.body|safe }}
0 comments (0 inline, 0 general)