Names status urls
This commit is contained in:
parent
8711a2eba5
commit
fb900d58cd
|
@ -197,12 +197,26 @@ urlpatterns = [
|
||||||
re_path(r"^block/(?P<user_id>\d+)/?$", views.Block.as_view()),
|
re_path(r"^block/(?P<user_id>\d+)/?$", views.Block.as_view()),
|
||||||
re_path(r"^unblock/(?P<user_id>\d+)/?$", views.unblock),
|
re_path(r"^unblock/(?P<user_id>\d+)/?$", views.unblock),
|
||||||
# statuses
|
# statuses
|
||||||
re_path(r"%s(.json)?/?$" % status_path, views.Status.as_view()),
|
re_path(r"%s(.json)?/?$" % status_path, views.Status.as_view(), name="status"),
|
||||||
re_path(r"%s/activity/?$" % status_path, views.Status.as_view()),
|
re_path(r"%s/activity/?$" % status_path, views.Status.as_view(), name="status"),
|
||||||
re_path(r"%s/replies(.json)?/?$" % status_path, views.Replies.as_view()),
|
re_path(
|
||||||
re_path(r"^post/(?P<status_type>\w+)/?$", views.CreateStatus.as_view()),
|
r"%s/replies(.json)?/?$" % status_path, views.Replies.as_view(), name="replies"
|
||||||
re_path(r"^delete-status/(?P<status_id>\d+)/?$", views.DeleteStatus.as_view()),
|
),
|
||||||
re_path(r"^redraft-status/(?P<status_id>\d+)/?$", views.DeleteAndRedraft.as_view()),
|
re_path(
|
||||||
|
r"^post/(?P<status_type>\w+)/?$",
|
||||||
|
views.CreateStatus.as_view(),
|
||||||
|
name="create-status",
|
||||||
|
),
|
||||||
|
re_path(
|
||||||
|
r"^delete-status/(?P<status_id>\d+)/?$",
|
||||||
|
views.DeleteStatus.as_view(),
|
||||||
|
name="delete-status",
|
||||||
|
),
|
||||||
|
re_path(
|
||||||
|
r"^redraft-status/(?P<status_id>\d+)/?$",
|
||||||
|
views.DeleteAndRedraft.as_view(),
|
||||||
|
name="redraft",
|
||||||
|
),
|
||||||
# interact
|
# interact
|
||||||
re_path(r"^favorite/(?P<status_id>\d+)/?$", views.Favorite.as_view()),
|
re_path(r"^favorite/(?P<status_id>\d+)/?$", views.Favorite.as_view()),
|
||||||
re_path(r"^unfavorite/(?P<status_id>\d+)/?$", views.Unfavorite.as_view()),
|
re_path(r"^unfavorite/(?P<status_id>\d+)/?$", views.Unfavorite.as_view()),
|
||||||
|
|
|
@ -109,8 +109,8 @@ class DeleteAndRedraft(View):
|
||||||
status.delete()
|
status.delete()
|
||||||
data = feed_page_data(request.user)
|
data = feed_page_data(request.user)
|
||||||
# TODO: set up the correct edit state
|
# TODO: set up the correct edit state
|
||||||
data['redraft_form'] = redraft_form
|
data["redraft_form"] = redraft_form
|
||||||
return TemplateResponse(request, 'feed/feed.html')
|
return TemplateResponse(request, "feed/feed.html")
|
||||||
|
|
||||||
|
|
||||||
def find_mentions(content):
|
def find_mentions(content):
|
||||||
|
|
Loading…
Reference in New Issue