kopia lustrzana https://gitlab.com/marnanel/chapeau
Status pages are HTML or JSON depending on Accept header.
rodzic
bfb7874d16
commit
6f033b7928
|
@ -19,6 +19,5 @@ urlpatterns = [
|
||||||
path('users/<str:username>/followers', bowler_pub_views.FollowersView.as_view()),
|
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>/following', bowler_pub_views.FollowingView.as_view()),
|
||||||
path('users/<str:username>/featured', bowler_pub_views.FeaturedView.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()),
|
path('sharedInbox', bowler_pub_views.InboxView.as_view()),
|
||||||
]
|
]
|
||||||
|
|
|
@ -7,9 +7,19 @@
|
||||||
from django.urls import path, re_path
|
from django.urls import path, re_path
|
||||||
import django.contrib.auth.views
|
import django.contrib.auth.views
|
||||||
import kepi.tophat_ui.views as tophat_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 = [
|
urlpatterns = [
|
||||||
path('', tophat_views.RootPage.as_view()),
|
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(
|
path('login/', django.contrib.auth.views.LoginView.as_view(
|
||||||
extra_context = {
|
extra_context = {
|
||||||
|
|
Ładowanie…
Reference in New Issue