mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
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"
|
class="block"
|
||||||
{% if book.id %}
|
{% if book.id %}
|
||||||
name="edit-book"
|
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 %}
|
{% else %}
|
||||||
name="create-book"
|
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 %}
|
{% endif %}
|
||||||
method="post"
|
method="post"
|
||||||
enctype="multipart/form-data"
|
enctype="multipart/form-data"
|
||||||
|
|
|
@ -537,12 +537,20 @@ urlpatterns = [
|
||||||
name="book-user-statuses",
|
name="book-user-statuses",
|
||||||
),
|
),
|
||||||
re_path(rf"{BOOK_PATH}/edit/?$", views.EditBook.as_view(), name="edit-book"),
|
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(
|
re_path(
|
||||||
r"^create-book/data/?$", views.create_book_from_data, name="create-book-data"
|
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/?$", 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(rf"{BOOK_PATH}/editions(.json)?/?$", views.Editions.as_view()),
|
||||||
re_path(
|
re_path(
|
||||||
r"^upload-cover/(?P<book_id>\d+)/?$", views.upload_cover, name="upload-cover"
|
r"^upload-cover/(?P<book_id>\d+)/?$", views.upload_cover, name="upload-cover"
|
||||||
|
|
Loading…
Reference in a new issue