Add new to do list UI

This commit is contained in:
rubenwardy
2021-01-29 19:38:14 +00:00
parent b613ac4b89
commit 4f920f011f
14 changed files with 299 additions and 110 deletions

View File

@@ -54,17 +54,8 @@ def profile(username):
packages = packages.filter_by(state=PackageState.APPROVED)
packages = packages.order_by(db.asc(Package.title))
topics_to_add = None
if current_user == user or user.checkPerm(current_user, Permission.CHANGE_AUTHOR):
topics_to_add = ForumTopic.query \
.filter_by(author_id=user.id) \
.filter(~ db.exists().where(Package.forums == ForumTopic.topic_id)) \
.order_by(db.asc(ForumTopic.name), db.asc(ForumTopic.title)) \
.all()
# Process GET or invalid POST
return render_template("users/profile.html",
user=user, packages=packages, topics_to_add=topics_to_add)
return render_template("users/profile.html", user=user, packages=packages)
@bp.route("/users/<username>/check/", methods=["POST"])