Status pages are HTML or JSON depending on Accept header.

merge-requests/2/merge
Marnanel Thurman 2020-11-25 18:36:07 +00:00
rodzic bfb7874d16
commit 6f033b7928
2 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -19,6 +19,5 @@ urlpatterns = [
path('users/<str:username>/followers', bowler_pub_views.FollowersView.as_view()),
path('users/<str:username>/following', bowler_pub_views.FollowingView.as_view()),
path('users/<str:username>/featured', bowler_pub_views.FeaturedView.as_view()),
path('users/<str:username>/<int:status>', bowler_pub_views.StatusView.as_view()),
path('sharedInbox', bowler_pub_views.InboxView.as_view()),
]

Wyświetl plik

@ -7,9 +7,19 @@
from django.urls import path, re_path
import django.contrib.auth.views
import kepi.tophat_ui.views as tophat_views
import kepi.bowler_pub.views as bowler_views
from kepi.tophat_ui.view_for_mimetype import view_for_mimetype
urlpatterns = [
path('', tophat_views.RootPage.as_view()),
path('users/<str:username>/<int:status>',
view_for_mimetype(
[
('application', 'activity+json',
bowler_views.StatusView.as_view()),
],
default = tophat_views.StatusPage.as_view(),
)),
path('login/', django.contrib.auth.views.LoginView.as_view(
extra_context = {