diff --git a/bookie/static/images/twitter-icon.png b/bookie/static/images/twitter-icon.png new file mode 100644 index 00000000..333cf3a5 Binary files /dev/null and b/bookie/static/images/twitter-icon.png differ diff --git a/bookie/templates/accounts/index.mako b/bookie/templates/accounts/index.mako index d8ba87c2..be67f678 100644 --- a/bookie/templates/accounts/index.mako +++ b/bookie/templates/accounts/index.mako @@ -101,6 +101,23 @@ ${account_nav()} ${password_reset(user, reset=False)} +
+
Social Profiles
+ + % for connection in connections: + % if connection.type == 'TwitterConnection': + + + + + % endif + % endfor +
TwitterConnected as: + @${connection.twitter_username} +
+ Add Twitter Profile +
+
Bookie ExtensionsExtensions

We have browser extensions that work with Bookie for:

diff --git a/bookie/views/accounts.py b/bookie/views/accounts.py index caa2861b..f6643cda 100644 --- a/bookie/views/accounts.py +++ b/bookie/views/accounts.py @@ -3,6 +3,7 @@ from pyramid.view import view_config from bookie.lib.access import ReqAuthorize +from bookie.models.social import SocialMgr from bookie.models.auth import UserMgr LOG = logging.getLogger(__name__) @@ -19,8 +20,10 @@ def account(request): # if auth fails, it'll raise an HTTPForbidden exception with ReqAuthorize(request): user = UserMgr.get(username=request.user.username) - + connections = SocialMgr.get_all_connections(username=request.user.username).all() + return { 'user': user, 'username': user.username, + 'connections': connections, }