From ba22f9a3a55126fc05ef4f848393ddbeb4de048e Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 31 May 2013 08:29:19 -0500 Subject: [PATCH] new twitter widget in admin, deleted old --- VERSION | 2 +- applications/admin/controllers/default.py | 20 -------------------- applications/admin/views/default/site.html | 8 -------- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/VERSION b/VERSION index 92d46eae..7f103fde 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.7-stable+timestamp.2013.05.31.08.19.48 +Version 2.4.7-stable+timestamp.2013.05.31.08.28.32 diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 7f8106d9..500431eb 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -1677,26 +1677,6 @@ def update_languages(): redirect(URL('design', args=app, anchor='languages')) -def twitter(): - session.forget() - session._unlock(response) - import gluon.tools - import gluon.contrib.simplejson as sj - try: - if TWITTER_HASH: - page = urllib.urlopen("http://search.twitter.com/search.json?q=%%40%s" % TWITTER_HASH).read() - data = sj.loads(page, encoding="utf-8")['results'] - d = dict() - for e in data: - d[e["id"]] = e - r = reversed(sorted(d)) - return dict(tweets=[d[k] for k in r]) - else: - return 'disabled' - except Exception, e: - return DIV(T('Unable to download because:'), BR(), str(e)) - - def user(): if MULTI_USER_MODE: if not db(db.auth_user).count(): diff --git a/applications/admin/views/default/site.html b/applications/admin/views/default/site.html index 68849b97..7bb949f6 100644 --- a/applications/admin/views/default/site.html +++ b/applications/admin/views/default/site.html @@ -147,14 +147,6 @@ Tweets by @web2py - {{if False and TWITTER_HASH:}} - -
-

{{=T("%s Recent Tweets"%TWITTER_HASH)}}

-
{{=T('loading...')}}
- -
- {{pass}}