112 lines
3.2 KiB
Python
112 lines
3.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import annotations
|
|
|
|
from django.urls import path
|
|
|
|
from hotpocket_backend.apps.ui.constants import StarUnstarAssociationViewMode
|
|
|
|
# isort: off
|
|
from .views import (
|
|
accounts,
|
|
associations,
|
|
imports,
|
|
index,
|
|
integrations,
|
|
meta,
|
|
saves,
|
|
)
|
|
# isort: on
|
|
|
|
urlpatterns = [
|
|
path(
|
|
'accounts/login/',
|
|
accounts.LoginView.as_view(),
|
|
name='ui.accounts.login',
|
|
),
|
|
path(
|
|
'accounts/post-login/',
|
|
accounts.PostLoginView.as_view(),
|
|
name='ui.accounts.post_login',
|
|
),
|
|
path('accounts/logout/', accounts.logout, name='ui.accounts.logout'),
|
|
path('accounts/browse/', accounts.browse, name='ui.accounts.browse'),
|
|
path('accounts/settings/', accounts.settings, name='ui.accounts.settings'),
|
|
path(
|
|
'accounts/settings/profile/',
|
|
accounts.ProfileView.as_view(),
|
|
name='ui.accounts.settings.profile',
|
|
),
|
|
path(
|
|
'accounts/settings/password/',
|
|
accounts.PasswordView.as_view(),
|
|
name='ui.accounts.settings.password',
|
|
),
|
|
path(
|
|
'accounts/settings/settings/',
|
|
accounts.SettingsView.as_view(),
|
|
name='ui.accounts.settings.settings',
|
|
),
|
|
path('accounts/', accounts.index, name='ui.accounts.index'),
|
|
path(
|
|
'imports/pocket/',
|
|
imports.PocketImportView.as_view(),
|
|
name='ui.imports.pocket',
|
|
),
|
|
path(
|
|
'integrations/ios/shortcut/',
|
|
integrations.ios.shortcut,
|
|
name='ui.integrations.ios.shortcut',
|
|
),
|
|
path(
|
|
'integrations/android/share-sheet/',
|
|
integrations.android.share_sheet,
|
|
name='ui.integrations.android.share_sheet',
|
|
),
|
|
path(
|
|
'saves/create/',
|
|
saves.CreateView.as_view(),
|
|
name='ui.saves.create',
|
|
),
|
|
path('saves/embed/', saves.embed, name='ui.saves.embed'),
|
|
path('associations/browse/', associations.browse, name='ui.associations.browse'),
|
|
path('associations/view/<str:pk>/', associations.view, name='ui.associations.view'),
|
|
path(
|
|
'associations/edit/<str:pk>/',
|
|
associations.EditView.as_view(),
|
|
name='ui.associations.edit',
|
|
),
|
|
path(
|
|
'associations/star/<str:pk>/',
|
|
associations.StarUnstarView.as_view(mode=StarUnstarAssociationViewMode.STAR),
|
|
name='ui.associations.star',
|
|
),
|
|
path(
|
|
'associations/unstar/<str:pk>/',
|
|
associations.StarUnstarView.as_view(mode=StarUnstarAssociationViewMode.UNSTAR),
|
|
name='ui.associations.unstar',
|
|
),
|
|
path(
|
|
'associations/post-save/<str:pk>/',
|
|
associations.post_save,
|
|
name='ui.associations.post_save',
|
|
),
|
|
path(
|
|
'associations/refresh/<str:pk>/',
|
|
associations.RefreshView.as_view(),
|
|
name='ui.associations.refresh',
|
|
),
|
|
path(
|
|
'associations/archive/<str:pk>/',
|
|
associations.ArchiveView.as_view(),
|
|
name='ui.associations.archive',
|
|
),
|
|
path(
|
|
'associations/delete/<str:pk>/',
|
|
associations.DeleteView.as_view(),
|
|
name='ui.associations.delete',
|
|
),
|
|
path('associations/', associations.index, name='ui.associations.index'),
|
|
path('manifest.json', meta.manifest_json, name='ui.meta.manifest_json'),
|
|
path('', index.index, name='ui.index.index'),
|
|
]
|