[extensions-web/theme/gnome-grass/2016: 3/3] theme: replaced custom "nobody" avatar with Gravatar's "mystery man".



commit 2330bc77df7bded203c45f6cfd57d085bdc00d1a
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sat Nov 5 19:09:33 2016 +0300

    theme: replaced custom "nobody" avatar with Gravatar's "mystery man".

 sweettooth/static/images/nobody.png |  Bin 5701 -> 0 bytes
 sweettooth/utils.py                 |    3 +--
 2 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/utils.py b/sweettooth/utils.py
index cb69266..b97b03e 100644
--- a/sweettooth/utils.py
+++ b/sweettooth/utils.py
@@ -6,6 +6,5 @@ GRAVATAR_BASE = "https://secure.gravatar.com/avatar/%s?%s";
 
 def gravatar_url(request, email, size=70):
     email_md5 = hashlib.md5(email.lower()).hexdigest()
-    default = request.build_absolute_uri("/static/images/nobody.png")
-    options = urllib.urlencode(dict(d=default, s=size))
+    options = urllib.urlencode(dict(d="mm", s=size))
     return GRAVATAR_BASE % (email_md5, options)


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