linkding/bookmarks/urls.py

37 lines
1.7 KiB
Python
Raw Normal View History

from django.urls import re_path
from django.urls import path, include
2019-06-28 05:33:08 +00:00
from django.views.generic import RedirectView
2019-06-27 06:09:51 +00:00
from bookmarks.api.routes import router
2019-07-03 15:18:29 +00:00
from bookmarks import views
from bookmarks.feeds import AllBookmarksFeed, UnreadBookmarksFeed
2019-06-27 06:09:51 +00:00
app_name = 'bookmarks'
urlpatterns = [
2019-06-28 05:33:08 +00:00
# Redirect root to bookmarks index
re_path(r'^$', RedirectView.as_view(pattern_name='bookmarks:index', permanent=False)),
2019-06-28 23:08:22 +00:00
# Bookmarks
2019-07-06 06:14:13 +00:00
path('bookmarks', views.bookmarks.index, name='index'),
path('bookmarks/archived', views.bookmarks.archived, name='archived'),
path('bookmarks/shared', views.bookmarks.shared, name='shared'),
2019-07-06 06:14:13 +00:00
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'),
path('bookmarks/action', views.bookmarks.action, name='action'),
2019-07-05 08:04:52 +00:00
# Settings
2021-03-28 10:11:56 +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'),
2019-12-26 12:45:12 +00:00
path('settings/export', views.settings.bookmark_export, name='settings.export'),
# Toasts
path('toasts/acknowledge', views.toasts.acknowledge, name='toasts.acknowledge'),
# API
path('api/', include(router.urls), name='api'),
# Feeds
path('feeds/<str:feed_key>/all', AllBookmarksFeed(), name='feeds.all'),
path('feeds/<str:feed_key>/unread', UnreadBookmarksFeed(), name='feeds.unread'),
# Health check
path('health', views.health, name='health')
2019-06-27 06:09:51 +00:00
]