bookmark collections
This commit is contained in:
@@ -4,7 +4,7 @@ from flask import (
|
||||
from functools import wraps
|
||||
from ..db import db
|
||||
from ..lib.babycode import babycode_to_html, BABYCODE_VERSION
|
||||
from ..models import Users, Sessions, Subscriptions, Avatars, PasswordResetLinks, InviteKeys, BookmarkCollections
|
||||
from ..models import Users, Sessions, Subscriptions, Avatars, PasswordResetLinks, InviteKeys, BookmarkCollections, BookmarkedThreads
|
||||
from ..constants import InfoboxKind, PermissionLevel
|
||||
from ..auth import digest, verify
|
||||
from wand.image import Image
|
||||
@@ -700,4 +700,16 @@ def bookmarks(username):
|
||||
return redirect(url_for('.bookmarks', username=get_active_user().username))
|
||||
|
||||
collections = target_user.get_bookmark_collections()
|
||||
|
||||
return render_template('users/bookmarks.html', collections=collections)
|
||||
|
||||
|
||||
@bp.get('/<username>/bookmarks/collections')
|
||||
@login_required
|
||||
def bookmark_collections(username):
|
||||
target_user = Users.find({'username': username})
|
||||
if not target_user or target_user.username != get_active_user().username:
|
||||
return redirect(url_for('.bookmark_collections', username=get_active_user().username))
|
||||
|
||||
collections = target_user.get_bookmark_collections()
|
||||
return render_template('users/bookmark_collections.html', collections=collections)
|
||||
|
||||
Reference in New Issue
Block a user