aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-10-07 11:17:06 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-10-07 11:17:06 +0200
commit6368a464f3a153e284b84136c6f304a6924e9b59 (patch)
treed66d79a07ca9b423567c5a9e50546907a38c8a0c /src
parentGenerates the tag cloud of the user based on the last 10 weeks. (diff)
downloadnewspipe-6368a464f3a153e284b84136c6f304a6924e9b59.tar.gz
newspipe-6368a464f3a153e284b84136c6f304a6924e9b59.tar.bz2
newspipe-6368a464f3a153e284b84136c6f304a6924e9b59.zip
removed the tag cloud for the public profile page: too slow
Diffstat (limited to 'src')
-rw-r--r--src/web/templates/profile_public.html4
-rw-r--r--src/web/views/user.py7
2 files changed, 4 insertions, 7 deletions
diff --git a/src/web/templates/profile_public.html b/src/web/templates/profile_public.html
index 5bd002e0..bf080df0 100644
--- a/src/web/templates/profile_public.html
+++ b/src/web/templates/profile_public.html
@@ -32,9 +32,7 @@
<p align="justify">{{ user.bio }}</p>
{% endif %}
</div>
- <div class="col-md-6 pull-right">
- <div>{{ tag_cloud|safe }}</div>
- </div>
+ <div class="col-md-6 pull-right"></div>
</div>
<h2>Feeds</h2>
diff --git a/src/web/views/user.py b/src/web/views/user.py
index 9dca512c..fc94f205 100644
--- a/src/web/views/user.py
+++ b/src/web/views/user.py
@@ -29,17 +29,16 @@ def profile_public(nickname=None):
if not user.is_public_profile:
return redirect(url_for('home'))
- word_size = 6
+ """word_size = 6
filters = {}
filters['retrieved_date__gt'] = datetime.now() - timedelta(weeks=10)
articles = ArticleController(user.id).read(**filters).all()
top_words = misc_utils.top_words(articles, n=50, size=int(word_size))
- tag_cloud = misc_utils.tag_cloud(top_words)
+ tag_cloud = misc_utils.tag_cloud(top_words)"""
return render_template('profile_public.html',
user=user,
- feeds=user.feeds,
- tag_cloud=tag_cloud)
+ feeds=user.feeds)
@user_bp.route('/management', methods=['GET', 'POST'])
bgstack15