linkding/bookmarks/urls.py

69 lines
2.5 KiB
Python
Raw Normal View History

from django.urls import path, include
from django.urls import re_path
2019-06-27 06:09:51 +00:00
2019-07-03 15:18:29 +00:00
from bookmarks import views
from bookmarks.api.routes import router
from bookmarks.feeds import (
AllBookmarksFeed,
UnreadBookmarksFeed,
SharedBookmarksFeed,
PublicSharedBookmarksFeed,
)
2019-06-27 06:09:51 +00:00
2024-01-27 10:29:16 +00:00
app_name = "bookmarks"
2019-06-27 06:09:51 +00:00
urlpatterns = [
# Root view handling redirection based on user authentication
re_path(r"^$", views.root, name="root"),
2019-06-28 23:08:22 +00:00
# Bookmarks
2024-01-27 10:29:16 +00:00
path("bookmarks", views.bookmarks.index, name="index"),
path("bookmarks/action", views.bookmarks.index_action, name="index.action"),
path("bookmarks/archived", views.bookmarks.archived, name="archived"),
path(
"bookmarks/archived/action",
views.bookmarks.archived_action,
name="archived.action",
),
path("bookmarks/shared", views.bookmarks.shared, name="shared"),
path(
"bookmarks/shared/action", views.bookmarks.shared_action, name="shared.action"
),
path("bookmarks/new", views.bookmarks.new, name="new"),
path("bookmarks/close", views.bookmarks.close, name="close"),
path("bookmarks/<int:bookmark_id>/edit", views.bookmarks.edit, name="edit"),
# Assets
path(
"assets/<int:asset_id>",
views.assets.view,
name="assets.view",
),
path(
"assets/<int:asset_id>/read",
views.assets.read,
name="assets.read",
),
2019-07-05 08:04:52 +00:00
# Settings
2024-01-27 10:29:16 +00:00
path("settings", views.settings.general, name="settings.index"),
path("settings/general", views.settings.general, name="settings.general"),
path("settings/update", views.settings.update, name="settings.update"),
2024-01-27 10:29:16 +00:00
path(
"settings/integrations",
views.settings.integrations,
name="settings.integrations",
),
path("settings/import", views.settings.bookmark_import, name="settings.import"),
path("settings/export", views.settings.bookmark_export, name="settings.export"),
# Toasts
2024-01-27 10:29:16 +00:00
path("toasts/acknowledge", views.toasts.acknowledge, name="toasts.acknowledge"),
# API
2024-01-27 10:29:16 +00:00
path("api/", include(router.urls), name="api"),
# Feeds
2024-01-27 10:29:16 +00:00
path("feeds/<str:feed_key>/all", AllBookmarksFeed(), name="feeds.all"),
path("feeds/<str:feed_key>/unread", UnreadBookmarksFeed(), name="feeds.unread"),
path("feeds/<str:feed_key>/shared", SharedBookmarksFeed(), name="feeds.shared"),
path("feeds/shared", PublicSharedBookmarksFeed(), name="feeds.public_shared"),
# Health check
2024-01-27 10:29:16 +00:00
path("health", views.health, name="health"),
# Manifest
2024-01-27 10:29:16 +00:00
path("manifest.json", views.manifest, name="manifest"),
2019-06-27 06:09:51 +00:00
]