2020-09-27 07:34:56 +00:00
|
|
|
from django.urls import path, include
|
2023-08-21 21:12:00 +00:00
|
|
|
from django.urls import re_path
|
2019-06-28 05:33:08 +00:00
|
|
|
from django.views.generic import RedirectView
|
2019-06-27 06:09:51 +00:00
|
|
|
|
2019-07-03 15:18:29 +00:00
|
|
|
from bookmarks import views
|
2023-08-21 21:12:00 +00:00
|
|
|
from bookmarks.api.routes import router
|
2024-03-17 10:55:34 +00:00
|
|
|
from bookmarks.feeds import (
|
|
|
|
AllBookmarksFeed,
|
|
|
|
UnreadBookmarksFeed,
|
|
|
|
SharedBookmarksFeed,
|
|
|
|
PublicSharedBookmarksFeed,
|
|
|
|
)
|
2023-08-21 21:12:00 +00:00
|
|
|
from bookmarks.views import partials
|
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 = [
|
2019-06-28 05:33:08 +00:00
|
|
|
# Redirect root to bookmarks index
|
2024-01-27 10:29:16 +00:00
|
|
|
re_path(
|
|
|
|
r"^$", RedirectView.as_view(pattern_name="bookmarks:index", permanent=False)
|
|
|
|
),
|
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"),
|
2024-03-29 11:37:20 +00:00
|
|
|
path(
|
|
|
|
"bookmarks/<int:bookmark_id>/details",
|
|
|
|
views.bookmarks.details,
|
|
|
|
name="details",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"bookmarks/<int:bookmark_id>/details_modal",
|
|
|
|
views.bookmarks.details_modal,
|
|
|
|
name="details_modal",
|
|
|
|
),
|
2024-04-14 12:41:22 +00:00
|
|
|
path(
|
|
|
|
"bookmarks/<int:bookmark_id>/details_assets",
|
|
|
|
views.bookmarks.details_assets,
|
|
|
|
name="details_assets",
|
|
|
|
),
|
2024-04-01 13:19:38 +00:00
|
|
|
# Assets
|
|
|
|
path(
|
|
|
|
"assets/<int:asset_id>",
|
|
|
|
views.assets.view,
|
|
|
|
name="assets.view",
|
|
|
|
),
|
2024-04-20 07:18:57 +00:00
|
|
|
path(
|
|
|
|
"assets/<int:asset_id>/read",
|
|
|
|
views.assets.read,
|
|
|
|
name="assets.read",
|
|
|
|
),
|
2023-08-21 21:12:00 +00:00
|
|
|
# Partials
|
2024-01-27 10:29:16 +00:00
|
|
|
path(
|
|
|
|
"bookmarks/partials/bookmark-list/active",
|
|
|
|
partials.active_bookmark_list,
|
|
|
|
name="partials.bookmark_list.active",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"bookmarks/partials/tag-cloud/active",
|
|
|
|
partials.active_tag_cloud,
|
|
|
|
name="partials.tag_cloud.active",
|
|
|
|
),
|
2024-04-11 17:07:20 +00:00
|
|
|
path(
|
|
|
|
"bookmarks/partials/tag-modal/active",
|
|
|
|
partials.active_tag_modal,
|
|
|
|
name="partials.tag_modal.active",
|
|
|
|
),
|
2024-01-27 10:29:16 +00:00
|
|
|
path(
|
|
|
|
"bookmarks/partials/bookmark-list/archived",
|
|
|
|
partials.archived_bookmark_list,
|
|
|
|
name="partials.bookmark_list.archived",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"bookmarks/partials/tag-cloud/archived",
|
|
|
|
partials.archived_tag_cloud,
|
|
|
|
name="partials.tag_cloud.archived",
|
|
|
|
),
|
2024-04-11 17:07:20 +00:00
|
|
|
path(
|
|
|
|
"bookmarks/partials/tag-modal/archived",
|
|
|
|
partials.archived_tag_modal,
|
|
|
|
name="partials.tag_modal.archived",
|
|
|
|
),
|
2024-01-27 10:29:16 +00:00
|
|
|
path(
|
|
|
|
"bookmarks/partials/bookmark-list/shared",
|
|
|
|
partials.shared_bookmark_list,
|
|
|
|
name="partials.bookmark_list.shared",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"bookmarks/partials/tag-cloud/shared",
|
|
|
|
partials.shared_tag_cloud,
|
|
|
|
name="partials.tag_cloud.shared",
|
|
|
|
),
|
2024-04-01 13:19:38 +00:00
|
|
|
path(
|
2024-04-11 17:07:20 +00:00
|
|
|
"bookmarks/partials/tag-modal/shared",
|
|
|
|
partials.shared_tag_modal,
|
|
|
|
name="partials.tag_modal.shared",
|
2024-04-01 13:19:38 +00:00
|
|
|
),
|
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/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"),
|
2022-05-14 07:46:51 +00:00
|
|
|
# Toasts
|
2024-01-27 10:29:16 +00:00
|
|
|
path("toasts/acknowledge", views.toasts.acknowledge, name="toasts.acknowledge"),
|
2019-07-01 23:28:02 +00:00
|
|
|
# API
|
2024-01-27 10:29:16 +00:00
|
|
|
path("api/", include(router.urls), name="api"),
|
2022-07-23 21:20:27 +00:00
|
|
|
# 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"),
|
2024-03-17 10:55:34 +00:00
|
|
|
path("feeds/<str:feed_key>/shared", SharedBookmarksFeed(), name="feeds.shared"),
|
|
|
|
path("feeds/shared", PublicSharedBookmarksFeed(), name="feeds.public_shared"),
|
2023-01-20 21:26:58 +00:00
|
|
|
# Health check
|
2024-01-27 10:29:16 +00:00
|
|
|
path("health", views.health, name="health"),
|
2023-05-23 19:20:58 +00:00
|
|
|
# Manifest
|
2024-01-27 10:29:16 +00:00
|
|
|
path("manifest.json", views.manifest, name="manifest"),
|
2019-06-27 06:09:51 +00:00
|
|
|
]
|