mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 19:28:29 +02:00
Implement archive feature (#73)
* Implement archive function (#46) * Implement archive view (#46) * Filter tags for archived/unarchived (#46) * Implement archived bookmarks endpoint (#46) * Implement archive mode for search component (#46) * Move bookmarklet to settings (#46) * Update modified timestamp on archive/unarchive (#46) * Fix bookmarklet (#46)
This commit is contained in:
@@ -39,6 +39,20 @@ def update_bookmark(bookmark: Bookmark, tag_string, current_user: User):
|
||||
return bookmark
|
||||
|
||||
|
||||
def archive_bookmark(bookmark: Bookmark):
|
||||
bookmark.is_archived = True
|
||||
bookmark.date_modified = timezone.now()
|
||||
bookmark.save()
|
||||
return bookmark
|
||||
|
||||
|
||||
def unarchive_bookmark(bookmark: Bookmark):
|
||||
bookmark.is_archived = False
|
||||
bookmark.date_modified = timezone.now()
|
||||
bookmark.save()
|
||||
return bookmark
|
||||
|
||||
|
||||
def _merge_bookmark_data(from_bookmark: Bookmark, to_bookmark: Bookmark):
|
||||
to_bookmark.title = from_bookmark.title
|
||||
to_bookmark.description = from_bookmark.description
|
||||
|
Reference in New Issue
Block a user