Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions pybossa/view/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from pybossa.util import handle_content_type
from pybossa.cache import projects as cached_projects
from pybossa.cache import categories as cached_cat
from readability.readability import Document
# from readability.readability import Document # Disabled - not compatible with Python 3.9
from flask_login import login_required

blueprint = Blueprint('help', __name__)
Expand Down Expand Up @@ -60,7 +60,8 @@ def license():
@blueprint.route('/terms-of-use')
def tos():
"""Render help/terms-of-use page."""
cleaned_up_content = Document(render_template('help/tos.html')).summary()
# cleaned_up_content = Document(render_template('help/tos.html')).summary()
cleaned_up_content = render_template('help/tos.html') # Simplified without readability
response = dict(template='help/tos.html',
content=cleaned_up_content,
title='Help: Terms of Use')
Expand All @@ -70,7 +71,8 @@ def tos():
@blueprint.route('/cookies-policy')
def cookies_policy():
"""Render help/cookies-policy page."""
cleaned_up_content = Document(render_template('help/cookies_policy.html')).summary()
# cleaned_up_content = Document(render_template('help/cookies_policy.html')).summary()
cleaned_up_content = render_template('help/cookies_policy.html') # Simplified without readability
response = dict(template='help/cookies_policy.html',
content=cleaned_up_content,
title='Help: Cookies Policy')
Expand All @@ -82,7 +84,8 @@ def cookies_policy():
def privacy():
"""Render help/privacy policy page."""
# use readability to remove styling and headers
cleaned_up_content = Document(render_template('help/privacy.html')).summary()
# cleaned_up_content = Document(render_template('help/privacy.html')).summary()
cleaned_up_content = render_template('help/privacy.html') # Simplified without readability
response = dict(template='help/privacy.html',
content=cleaned_up_content,
title='Privacy Policy')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"raven==6.10.0",
"rax-default-network-flags-python-novaclient-ext==0.4.0",
"rax-scheduled-images-python-novaclient-ext==0.3.1",
"readability-lxml==0.8.1",
# "readability-lxml==0.8.1", # Disabled - not compatible with Python 3.9
"redis==3.5.3",
"rednose==1.3.0",
"requests==2.31.0",
Expand Down
Loading