summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2012-04-23 18:37:55 +0200
committerPierre-Yves Chibon <pingou@pingoured.fr>2012-04-23 18:37:55 +0200
commit17e7a8babf93feb65327db8898b2494c6b490d08 (patch)
tree21979e91fca6951684a7ee53115b1e5ae21ad69c
parent44a94a8301ad5c77d89f9521da7016bb58aee488 (diff)
downloadhyperkitty-17e7a8babf93feb65327db8898b2494c6b490d08.tar.gz
hyperkitty-17e7a8babf93feb65327db8898b2494c6b490d08.tar.xz
hyperkitty-17e7a8babf93feb65327db8898b2494c6b490d08.zip
Add integration with gravatar in the template and adjust documentation
-rw-r--r--README1
-rw-r--r--settings.py1
-rw-r--r--templates/message.html3
-rw-r--r--templates/month_view.html5
-rw-r--r--templates/recent_activities.html5
-rw-r--r--templates/search.html5
-rw-r--r--templates/thread.html5
7 files changed, 16 insertions, 9 deletions
diff --git a/README b/README
index 82e8a9b..c6ae0a9 100644
--- a/README
+++ b/README
@@ -37,6 +37,7 @@ easy_install bunch
easy_install pymongo
# easy_install urlgrabber -- no used for the moment
easy_install djangorestframework
+easy_install django-gravatar
# Install pymongo and the mongodb database
sudo yum install mongodb-server
diff --git a/settings.py b/settings.py
index bb1d2c1..280148f 100644
--- a/settings.py
+++ b/settings.py
@@ -131,6 +131,7 @@ INSTALLED_APPS = (
# 'django.contrib.admindocs',
'mongodb',
'djangorestframework',
+ 'gravatar',
)
# A sample logging configuration. The only tangible logging
diff --git a/templates/message.html b/templates/message.html
index 813886e..5e41326 100644
--- a/templates/message.html
+++ b/templates/message.html
@@ -1,4 +1,5 @@
{% extends "base_message.html" %}
+{% load gravatar %}
{% block title %}{{ app_name }}{% endblock %}
@@ -17,7 +18,7 @@
<!-- Start first email -->
<div class="first_email">
<div class="email_header">
- <img src="http://planet.fedoraproject.org/images/heads/default.png" alt="avatar" />
+ {% gravatar_img_for_email message.Email 40 %}
<div class="email_author inline-block">
<span class="name">{{message.From}}</span>
<br />
diff --git a/templates/month_view.html b/templates/month_view.html
index b55e353..a498467 100644
--- a/templates/month_view.html
+++ b/templates/month_view.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load poll_extras %}
+{% load gravatar %}
{% block title %}{{ app_name }}{% endblock %}
@@ -42,8 +43,8 @@
</div>
{% endif %}
<div class="inline-block gravatar">
- {% if email.avatar %}
- <img src="{{email.avatar}}" alt="avatar" /> <br />
+ {% if email.Email %}
+ {% gravatar_img_for_email email.Email 40 %} <br />
{% endif %}
{{email.From}}
</div>
diff --git a/templates/recent_activities.html b/templates/recent_activities.html
index d8b6ace..63e00e5 100644
--- a/templates/recent_activities.html
+++ b/templates/recent_activities.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load poll_extras %}
+{% load gravatar %}
{% block title %} {{ app_name }} {% endblock %}
@@ -164,8 +165,8 @@ vis.render();
<div class="maker">
<div class="inline-block maker_id"> #{{forloop.counter}} </div>
<div class="inline-block gravatar">
- {% if author.avatar %}
- <img src="{{author.avatar}}" alt="avatar" />
+ {% if author.Email %}
+ {% gravatar_img_for_email author.Email 40 %} <br />
{% endif %}
</div>
<div class="inline-block">
diff --git a/templates/search.html b/templates/search.html
index 36fbc1d..680191b 100644
--- a/templates/search.html
+++ b/templates/search.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load poll_extras %}
+{% load gravatar %}
{% block title %}{{ app_name }}{% endblock %}
@@ -56,8 +57,8 @@
</div>
{% endif %}
<div class="inline-block gravatar">
- {% if email.avatar %}
- <img src="{{email.avatar}}" alt="avatar" /> <br />
+ {% if email.Email %}
+ {% gravatar_img_for_email email.Email 40 %} <br />
{% endif %}
{{email.From}}
</div>
diff --git a/templates/thread.html b/templates/thread.html
index d6cda67..73685fc 100644
--- a/templates/thread.html
+++ b/templates/thread.html
@@ -1,4 +1,5 @@
{% extends "base_thread.html" %}
+{% load gravatar %}
{% block title %}{{ app_name }}{% endblock %}
@@ -72,7 +73,7 @@
<!-- Start first email -->
<div class="first_email">
<div class="email_header">
- <img src="http://planet.fedoraproject.org/images/heads/default.png" alt="avatar" />
+ {% gravatar_img_for_email first_mail.email.Email 40 %}
<div class="email_author inline-block">
<span class="name">
<a href="/message/{{list_address}}/{{first_mail.email.MessageID}}">{{first_mail.email.From}}</a>
@@ -104,7 +105,7 @@
<!-- Start email -->
<div class="email" style="padding-left: {{email.level}}em">
<div class="email_header">
- <img src="http://planet.fedoraproject.org/images/heads/default.png" alt="avatar" />
+ {% gravatar_img_for_email email.email.Email 40 %}
<div class="email_author inline-block">
<a href="/message/{{list_address}}/{{email.email.MessageID}}">{{email.email.From}}</a>
<br />