forked from mirrors/bookwyrm
Fixes urls in edit book form
This commit is contained in:
parent
cbd43c42a9
commit
6d7bb33683
2 changed files with 20 additions and 4 deletions
|
@ -41,10 +41,18 @@
|
|||
class="block"
|
||||
{% if book.id %}
|
||||
name="edit-book"
|
||||
action="{{ book.local_path }}/{% if confirm_mode %}confirm{% else %}edit{% endif %}"
|
||||
{% if confirm_mode %}
|
||||
action="{% url 'edit-book-confirm' book.id %}"
|
||||
{% else %}
|
||||
action="{% url 'edit-book' book.id %}"
|
||||
{% endif %}
|
||||
{% else %}
|
||||
name="create-book"
|
||||
action="/create-book{% if confirm_mode %}/confirm{% endif %}"
|
||||
{% if confirm_mode %}
|
||||
action="{% url 'create-book-confirm' %}"
|
||||
{% else %}
|
||||
action="{% url 'create-book' %}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
method="post"
|
||||
enctype="multipart/form-data"
|
||||
|
|
|
@ -537,12 +537,20 @@ urlpatterns = [
|
|||
name="book-user-statuses",
|
||||
),
|
||||
re_path(rf"{BOOK_PATH}/edit/?$", views.EditBook.as_view(), name="edit-book"),
|
||||
re_path(rf"{BOOK_PATH}/confirm/?$", views.ConfirmEditBook.as_view()),
|
||||
re_path(
|
||||
rf"{BOOK_PATH}/confirm/?$",
|
||||
views.ConfirmEditBook.as_view(),
|
||||
name="edit-book-confirm",
|
||||
),
|
||||
re_path(
|
||||
r"^create-book/data/?$", views.create_book_from_data, name="create-book-data"
|
||||
),
|
||||
re_path(r"^create-book/?$", views.CreateBook.as_view(), name="create-book"),
|
||||
re_path(r"^create-book/confirm/?$", views.ConfirmEditBook.as_view()),
|
||||
re_path(
|
||||
r"^create-book/confirm/?$",
|
||||
views.ConfirmEditBook.as_view(),
|
||||
name="create-book-confirm",
|
||||
),
|
||||
re_path(rf"{BOOK_PATH}/editions(.json)?/?$", views.Editions.as_view()),
|
||||
re_path(
|
||||
r"^upload-cover/(?P<book_id>\d+)/?$", views.upload_cover, name="upload-cover"
|
||||
|
|
Loading…
Reference in a new issue