diff --git a/bookwyrm/templates/snippets/status/status_options.html b/bookwyrm/templates/snippets/status/status_options.html index 0f6c73fff..45d1fa9cc 100644 --- a/bookwyrm/templates/snippets/status/status_options.html +++ b/bookwyrm/templates/snippets/status/status_options.html @@ -20,10 +20,10 @@ {% if status.status_type != 'GeneratedNote' and status.status_type != 'Rating' %} diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index c81d97903..e9d48a7aa 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -330,11 +330,6 @@ urlpatterns = [ views.DeleteStatus.as_view(), name="delete-status", ), - re_path( - r"^redraft-status/(?P\d+)/?$", - views.DeleteAndRedraft.as_view(), - name="redraft", - ), # interact re_path(r"^favorite/(?P\d+)/?$", views.Favorite.as_view(), name="fav"), re_path( diff --git a/bookwyrm/views/__init__.py b/bookwyrm/views/__init__.py index 63c5c7686..b8c53aeb4 100644 --- a/bookwyrm/views/__init__.py +++ b/bookwyrm/views/__init__.py @@ -60,7 +60,7 @@ from .search import Search from .shelf import Shelf from .shelf import create_shelf, delete_shelf from .shelf import shelve, unshelve -from .status import CreateStatus, DeleteStatus, DeleteAndRedraft, update_progress +from .status import CreateStatus, DeleteStatus, update_progress from .status import edit_readthrough from .updates import get_notification_count, get_unread_status_count from .user import User, Followers, Following, hide_suggestions diff --git a/bookwyrm/views/status.py b/bookwyrm/views/status.py index 32ce109d4..d84f0089b 100644 --- a/bookwyrm/views/status.py +++ b/bookwyrm/views/status.py @@ -27,13 +27,13 @@ class CreateStatus(View): """the view for *posting*""" def get(self, request, status_type): # pylint: disable=unused-argument - """compose view (used for delete-and-redraft)""" + """compose view (used for editing)""" book = get_object_or_404(models.Edition, id=request.GET.get("book")) data = {"book": book} return TemplateResponse(request, "compose.html", data) def post(self, request, status_type): - """create status of whatever type""" + """create status of whatever type""" status_type = status_type[0].upper() + status_type[1:] try: @@ -106,36 +106,6 @@ class DeleteStatus(View): return redirect(request.headers.get("Referer", "/")) -@method_decorator(login_required, name="dispatch") -class DeleteAndRedraft(View): - """delete a status but let the user re-create it""" - - def post(self, request, status_id): - """delete and tombstone a status""" - status = get_object_or_404( - models.Status.objects.select_subclasses(), id=status_id - ) - # don't let people redraft other people's statuses - status.raise_not_editable(request.user) - - status_type = status.status_type.lower() - if status.reply_parent: - status_type = "reply" - - data = { - "draft": status, - "type": status_type, - } - if hasattr(status, "book"): - data["book"] = status.book - elif status.mention_books: - data["book"] = status.mention_books.first() - - # perform deletion - status.delete() - return TemplateResponse(request, "compose.html", data) - - @login_required @require_POST def update_progress(request, book_id): # pylint: disable=unused-argument