PEP8 formatting
This commit is contained in:
@@ -17,14 +17,12 @@ from pillar.web.utils import attach_project_pictures
|
|||||||
from pillar.web.settings import blueprint as blueprint_settings
|
from pillar.web.settings import blueprint as blueprint_settings
|
||||||
from pillar.web.nodes.routes import url_for_node
|
from pillar.web.nodes.routes import url_for_node
|
||||||
|
|
||||||
|
|
||||||
blueprint = Blueprint('cloud', __name__)
|
blueprint = Blueprint('cloud', __name__)
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route('/')
|
@blueprint.route('/')
|
||||||
def homepage():
|
def homepage():
|
||||||
|
|
||||||
if current_user.is_anonymous:
|
if current_user.is_anonymous:
|
||||||
return redirect(url_for('cloud.welcome'))
|
return redirect(url_for('cloud.welcome'))
|
||||||
|
|
||||||
@@ -47,7 +45,7 @@ def _homepage_context() -> dict:
|
|||||||
'embedded': {'project': 1},
|
'embedded': {'project': 1},
|
||||||
'sort': '-_created',
|
'sort': '-_created',
|
||||||
'max_results': '5'
|
'max_results': '5'
|
||||||
}, api=api)
|
}, api=api)
|
||||||
|
|
||||||
# Append picture Files to last_posts
|
# Append picture Files to last_posts
|
||||||
for post in latest_posts._items:
|
for post in latest_posts._items:
|
||||||
@@ -152,6 +150,7 @@ def welcome():
|
|||||||
@current_app.cache.cached(timeout=3600, unless=current_user_is_authenticated)
|
@current_app.cache.cached(timeout=3600, unless=current_user_is_authenticated)
|
||||||
def render_page():
|
def render_page():
|
||||||
return render_template('welcome.html')
|
return render_template('welcome.html')
|
||||||
|
|
||||||
return render_page()
|
return render_page()
|
||||||
|
|
||||||
|
|
||||||
@@ -181,7 +180,7 @@ def get_projects(category):
|
|||||||
'category': category,
|
'category': category,
|
||||||
'is_private': False},
|
'is_private': False},
|
||||||
'sort': '-_created',
|
'sort': '-_created',
|
||||||
}, api=api)
|
}, api=api)
|
||||||
for project in projects._items:
|
for project in projects._items:
|
||||||
attach_project_pictures(project, api)
|
attach_project_pictures(project, api)
|
||||||
return projects
|
return projects
|
||||||
|
Reference in New Issue
Block a user