From d74767f4ef512af859c38c543380bc7545211cc6 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 24 Apr 2014 07:45:28 +0200 Subject: Added avatar to the profile section. --- pyaggr3g470r/__init__.py | 7 ++++++- pyaggr3g470r/templates/admin/user.html | 11 +++++++++-- pyaggr3g470r/templates/management.html | 13 ++++++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/__init__.py b/pyaggr3g470r/__init__.py index 2f52dc2c..e948a187 100644 --- a/pyaggr3g470r/__init__.py +++ b/pyaggr3g470r/__init__.py @@ -4,6 +4,7 @@ import os from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy +from flask.ext.gravatar import Gravatar import conf @@ -36,4 +37,8 @@ if not conf.ON_HEROKU: from flask.ext.mail import Message, Mail mail = Mail(app) -from pyaggr3g470r import views \ No newline at end of file +# Gravatar +gravatar = Gravatar(app, size=100, rating='g', default='retro', + force_default=False, use_ssl=False, base_url=None) + +from pyaggr3g470r import views diff --git a/pyaggr3g470r/templates/admin/user.html b/pyaggr3g470r/templates/admin/user.html index a13a5248..fb60d8b1 100644 --- a/pyaggr3g470r/templates/admin/user.html +++ b/pyaggr3g470r/templates/admin/user.html @@ -7,8 +7,15 @@
Edit this user

Membership

-

Member since {{ user.date_created.strftime('%A, %d %B %Y') }}.

-

Last seen: {{ user.last_seen.strftime('%A, %d %B %Y at %H:%M:%S') }}.

+
+
+

Member since {{ user.date_created.strftime('%A, %d %B %Y') }}.

+

Last seen: {{ user.last_seen.strftime('%A, %d %B %Y at %H:%M:%S') }}.

+
+
+ +
+
{% if user.feeds.all()|count == 0 %} diff --git a/pyaggr3g470r/templates/management.html b/pyaggr3g470r/templates/management.html index ad2faada..2f95daaa 100644 --- a/pyaggr3g470r/templates/management.html +++ b/pyaggr3g470r/templates/management.html @@ -11,9 +11,16 @@

Your Profile

-

Update your profile.

-

Member since {{ user.date_created.strftime('%A, %d %B %Y') }}.

-

Last seen: {{ user.last_seen.strftime('%A, %d %B %Y at %H:%M:%S') }}.

+
+
+

Update your profile.

+

Member since {{ user.date_created.strftime('%A, %d %B %Y') }}.

+

Last seen: {{ user.last_seen.strftime('%A, %d %B %Y at %H:%M:%S') }}.

+
+
+ +
+

Import/export feeds

-- cgit