2022-11-05 20:17:27 +00:00
|
|
|
from django.contrib import admin
|
|
|
|
from django.urls import path
|
|
|
|
|
2022-11-16 01:30:30 +00:00
|
|
|
from activities.views import posts, timelines
|
2022-11-05 20:17:27 +00:00
|
|
|
from core import views as core
|
2022-11-09 06:06:29 +00:00
|
|
|
from stator import views as stator
|
2022-11-17 00:23:46 +00:00
|
|
|
from users.views import activitypub, auth, identity, settings_identity, settings_system
|
2022-11-05 20:17:27 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
path("", core.homepage),
|
2022-11-16 13:53:39 +00:00
|
|
|
path("manifest.json", core.AppManifest.as_view()),
|
2022-11-13 23:14:38 +00:00
|
|
|
# Activity views
|
2022-11-14 01:42:47 +00:00
|
|
|
path("notifications/", timelines.Notifications.as_view()),
|
|
|
|
path("local/", timelines.Local.as_view()),
|
2022-11-13 23:14:38 +00:00
|
|
|
path("federated/", timelines.Federated.as_view()),
|
2022-11-17 00:23:46 +00:00
|
|
|
path("settings/", settings_identity.IdentitySettingsRoot.as_view()),
|
|
|
|
path("settings/interface/", settings_identity.InterfacePage.as_view()),
|
|
|
|
path("settings/system/", settings_system.SystemSettingsRoot.as_view()),
|
|
|
|
path("settings/system/basic/", settings_system.BasicPage.as_view()),
|
2022-11-17 04:12:28 +00:00
|
|
|
path("settings/system/domains/", settings_system.DomainsPage.as_view()),
|
|
|
|
path("settings/system/domains/create/", settings_system.DomainCreatePage.as_view()),
|
|
|
|
path("settings/system/domains/<domain>/", settings_system.DomainEditPage.as_view()),
|
|
|
|
path(
|
|
|
|
"settings/system/domains/<domain>/delete/",
|
|
|
|
settings_system.DomainDeletePage.as_view(),
|
|
|
|
),
|
2022-11-05 20:17:27 +00:00
|
|
|
# Identity views
|
|
|
|
path("@<handle>/", identity.ViewIdentity.as_view()),
|
2022-11-13 04:14:21 +00:00
|
|
|
path("@<handle>/actor/", activitypub.Actor.as_view()),
|
|
|
|
path("@<handle>/actor/inbox/", activitypub.Inbox.as_view()),
|
2022-11-07 04:30:07 +00:00
|
|
|
path("@<handle>/action/", identity.ActionIdentity.as_view()),
|
2022-11-16 01:30:30 +00:00
|
|
|
# Posts
|
2022-11-16 13:53:39 +00:00
|
|
|
path("compose/", posts.Compose.as_view()),
|
|
|
|
path("@<handle>/posts/<int:post_id>/", posts.Individual.as_view()),
|
2022-11-16 01:30:30 +00:00
|
|
|
path("@<handle>/posts/<int:post_id>/like/", posts.Like.as_view()),
|
|
|
|
path("@<handle>/posts/<int:post_id>/unlike/", posts.Like.as_view(undo=True)),
|
|
|
|
path("@<handle>/posts/<int:post_id>/boost/", posts.Boost.as_view()),
|
|
|
|
path("@<handle>/posts/<int:post_id>/unboost/", posts.Boost.as_view(undo=True)),
|
|
|
|
# Authentication
|
|
|
|
path("auth/login/", auth.Login.as_view()),
|
|
|
|
path("auth/logout/", auth.Logout.as_view()),
|
2022-11-05 20:17:27 +00:00
|
|
|
# Identity selection
|
2022-11-06 02:10:39 +00:00
|
|
|
path("@<handle>/activate/", identity.ActivateIdentity.as_view()),
|
2022-11-05 20:17:27 +00:00
|
|
|
path("identity/select/", identity.SelectIdentity.as_view()),
|
|
|
|
path("identity/create/", identity.CreateIdentity.as_view()),
|
|
|
|
# Well-known endpoints
|
2022-11-13 04:14:21 +00:00
|
|
|
path(".well-known/webfinger", activitypub.Webfinger.as_view()),
|
|
|
|
path(".well-known/host-meta", activitypub.HostMeta.as_view()),
|
2022-11-06 04:49:25 +00:00
|
|
|
# Task runner
|
2022-11-09 06:06:29 +00:00
|
|
|
path(".stator/runner/", stator.RequestRunner.as_view()),
|
2022-11-05 20:17:27 +00:00
|
|
|
# Django admin
|
|
|
|
path("djadmin/", admin.site.urls),
|
|
|
|
]
|