social-area page and profile page update

This commit is contained in:
Inga Kirschnick
2023-03-01 14:09:15 +01:00
parent ec6d0a6477
commit b1586b3679
10 changed files with 144 additions and 58 deletions

View File

@ -27,20 +27,7 @@ def faq():
@bp.route('/dashboard')
@login_required
def dashboard():
# users = [
# u.to_json_serializeable(filter_by_privacy_settings=True) for u
# in User.query.filter(User.is_public == True, User.id != current_user.id).all()
# ]
# corpora = [
# c.to_json_serializeable() for c
# in Corpus.query.filter(Corpus.is_public == True, Corpus.user != current_user).all()
# ]
return render_template(
'main/dashboard.html.j2',
title='Dashboard',
# users=users,
# corpora=corpora
)
return render_template('main/dashboard.html.j2', title='Dashboard')
@bp.route('/dashboard2')
@ -67,3 +54,20 @@ def privacy_policy():
@bp.route('/terms_of_use')
def terms_of_use():
return render_template('main/terms_of_use.html.j2', title='Terms of Use')
@bp.route('/social-area')
def social_area():
users = [
u.to_json_serializeable(relationships=True, filter_by_privacy_settings=True,) for u
in User.query.filter(User.is_public == True, User.id != current_user.id).all()
]
corpora = [
c.to_json_serializeable() for c
in Corpus.query.filter(Corpus.is_public == True, Corpus.user != current_user).all()
]
return render_template(
'main/social_area.html.j2',
users=users,
corpora=corpora,
title='Social Area'
)