2019-06-28 05:33:08 +00:00
|
|
|
from django.conf.urls import url
|
2020-09-27 07:34:56 +00:00
|
|
|
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
|
|
|
|
2020-09-27 07:34:56 +00:00
|
|
|
from bookmarks.api.routes import router
|
2019-07-03 15:18:29 +00:00
|
|
|
from bookmarks import views
|
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
|
|
|
|
url(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'),
|
2021-02-14 17:00:22 +00:00
|
|
|
path('bookmarks/archived', views.bookmarks.archived, name='archived'),
|
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/<int:bookmark_id>/remove', views.bookmarks.remove, name='remove'),
|
2021-02-14 17:00:22 +00:00
|
|
|
path('bookmarks/<int:bookmark_id>/archive', views.bookmarks.archive, name='archive'),
|
|
|
|
path('bookmarks/<int:bookmark_id>/unarchive', views.bookmarks.unarchive, name='unarchive'),
|
2019-07-05 08:04:52 +00:00
|
|
|
# Settings
|
2019-07-06 15:17:14 +00:00
|
|
|
path('settings', views.settings.index, name='settings.index'),
|
|
|
|
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'),
|
2019-07-01 23:28:02 +00:00
|
|
|
# API
|
2020-09-13 06:46:07 +00:00
|
|
|
path('api/check_url', views.api.check_url, name='api.check_url'),
|
2020-12-31 08:47:51 +00:00
|
|
|
path('api/', include(router.urls), name='api')
|
2019-06-27 06:09:51 +00:00
|
|
|
]
|