[extensions-web] Host "nobody.png" locally



commit 85ab25b07ddf0ecec519c9ceea4b34874b9f0727
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Feb 9 14:09:57 2012 -0500

    Host "nobody.png" locally
    
    This is the only asset that we serve over HTTP, not HTTPS. Because
    https://planet.gnome.org has a cert error, just copy the image into
    our local tree and serve it from there.

 sweettooth/extensions/templatetags/gravatar.py |    2 +-
 sweettooth/static/images/nobody.png            |  Bin 0 -> 5701 bytes
 2 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/extensions/templatetags/gravatar.py b/sweettooth/extensions/templatetags/gravatar.py
index 6014513..df034a3 100644
--- a/sweettooth/extensions/templatetags/gravatar.py
+++ b/sweettooth/extensions/templatetags/gravatar.py
@@ -6,7 +6,7 @@ register = template.Library()
 GRAVATAR_BASE = "https://secure.gravatar.com/avatar/%s?%s";
 
 @register.simple_tag
-def gravatar_url(email, size=70, default="http://planet.gnome.org/heads/nobody.png";):
+def gravatar_url(email, size=70, default="/static/images/nobody.png"):
     email_md5 = hashlib.md5(email.lower()).hexdigest()
     options = urllib.urlencode(dict(d=default, s=size))
     return GRAVATAR_BASE % (email_md5, options)
diff --git a/sweettooth/static/images/nobody.png b/sweettooth/static/images/nobody.png
new file mode 100644
index 0000000..dee7669
Binary files /dev/null and b/sweettooth/static/images/nobody.png differ



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]