diff options
| author | Andrew Godwin | 2022-11-15 18:30:30 -0700 | 
|---|---|---|
| committer | Andrew Godwin | 2022-11-15 15:30:32 -0700 | 
| commit | 20e63023bb0d3c7e4cb36b91b73e79f51889cc90 (patch) | |
| tree | 96c99139f03550e35902440cd321290bc47f8f0f /takahe | |
| parent | 4aa92744aea6097ffb784ca7de6bd95cc599988d (diff) | |
| download | takahe-20e63023bb0d3c7e4cb36b91b73e79f51889cc90.tar.gz takahe-20e63023bb0d3c7e4cb36b91b73e79f51889cc90.tar.bz2 takahe-20e63023bb0d3c7e4cb36b91b73e79f51889cc90.zip  | |
Get outbound likes/boosts and their undos working
Diffstat (limited to 'takahe')
| -rw-r--r-- | takahe/settings/base.py | 2 | ||||
| -rw-r--r-- | takahe/urls.py | 14 | 
2 files changed, 12 insertions, 4 deletions
diff --git a/takahe/settings/base.py b/takahe/settings/base.py index 4808d97..e45133d 100644 --- a/takahe/settings/base.py +++ b/takahe/settings/base.py @@ -12,6 +12,7 @@ INSTALLED_APPS = [      "django.contrib.sessions",      "django.contrib.messages",      "django.contrib.staticfiles", +    "django_htmx",      "core",      "activities",      "users", @@ -26,6 +27,7 @@ MIDDLEWARE = [      "django.contrib.auth.middleware.AuthenticationMiddleware",      "django.contrib.messages.middleware.MessageMiddleware",      "django.middleware.clickjacking.XFrameOptionsMiddleware", +    "django_htmx.middleware.HtmxMiddleware",      "users.middleware.IdentityMiddleware",  ] diff --git a/takahe/urls.py b/takahe/urls.py index bebd63a..a87ec87 100644 --- a/takahe/urls.py +++ b/takahe/urls.py @@ -1,7 +1,7 @@  from django.contrib import admin  from django.urls import path -from activities.views import timelines +from activities.views import posts, timelines  from core import views as core  from stator import views as stator  from users.views import activitypub, auth, identity @@ -12,14 +12,20 @@ urlpatterns = [      path("notifications/", timelines.Notifications.as_view()),      path("local/", timelines.Local.as_view()),      path("federated/", timelines.Federated.as_view()), -    # Authentication -    path("auth/login/", auth.Login.as_view()), -    path("auth/logout/", auth.Logout.as_view()),      # Identity views      path("@<handle>/", identity.ViewIdentity.as_view()),      path("@<handle>/actor/", activitypub.Actor.as_view()),      path("@<handle>/actor/inbox/", activitypub.Inbox.as_view()),      path("@<handle>/action/", identity.ActionIdentity.as_view()), +    # Posts +    path("@<handle>/posts/<int:post_id>/", posts.Post.as_view()), +    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()),      # Identity selection      path("@<handle>/activate/", identity.ActivateIdentity.as_view()),      path("identity/select/", identity.SelectIdentity.as_view()),  | 
