mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 03:08:29 +02:00
Add option to share bookmarks publicly (#503)
* Make shared view public, add user profile fallback * Allow unauthenticated access to shared bookmarks API * Link shared bookmarks in unauthenticated layout * Add public sharing setting * Only show shared bookmarks link if there are publicly shared bookmarks * Disable public sharing if sharing is disabled * Show specific helper text when public sharing is enabled * Fix tests * Add more tests * Improve setting description
This commit is contained in:
@@ -46,7 +46,7 @@ def general(request):
|
||||
refresh_favicons_success_message = 'Scheduled favicon update. This may take a while...'
|
||||
|
||||
if not profile_form:
|
||||
profile_form = UserProfileForm(instance=request.user.profile)
|
||||
profile_form = UserProfileForm(instance=request.user_profile)
|
||||
|
||||
return render(request, 'settings/general.html', {
|
||||
'form': profile_form,
|
||||
@@ -141,7 +141,7 @@ def bookmark_import(request):
|
||||
def bookmark_export(request):
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
bookmarks = list(query_bookmarks(request.user, request.user.profile, ''))
|
||||
bookmarks = list(query_bookmarks(request.user, request.user_profile, ''))
|
||||
# Prefetch tags to prevent n+1 queries
|
||||
prefetch_related_objects(bookmarks, 'tags')
|
||||
file_content = exporter.export_netscape_html(bookmarks)
|
||||
|
Reference in New Issue
Block a user