User page is HTML or JSON depending on Accept header.

Closes issue #48.
merge-requests/2/merge
Marnanel Thurman 2020-11-25 18:46:31 +00:00
rodzic 5e6a4a1721
commit 0e15db00da
2 zmienionych plików z 10 dodań i 1 usunięć

Wyświetl plik

@ -13,7 +13,6 @@ import kepi.bowler_pub.views as bowler_pub_views
urlpatterns = [
path('users', bowler_pub_views.AllUsersView.as_view()),
path('users/<str:username>', bowler_pub_views.PersonView.as_view()),
path('users/<str:username>/inbox', bowler_pub_views.InboxView.as_view()),
path('users/<str:username>/outbox', bowler_pub_views.OutboxView.as_view()),
path('users/<str:username>/followers', bowler_pub_views.FollowersView.as_view()),

Wyświetl plik

@ -12,6 +12,16 @@ from kepi.tophat_ui.view_for_mimetype import view_for_mimetype
urlpatterns = [
path('', tophat_views.RootPage.as_view()),
path('users/<str:username>',
view_for_mimetype(
[
('application', 'activity+json',
bowler_views.PersonView.as_view()),
],
default = tophat_views.UserPage.as_view(),
)),
path('users/<str:username>/<int:status>',
view_for_mimetype(
[