mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-28 19:10:35 +00:00
CHanges urls from shelves to books
This commit is contained in:
parent
5dc23682a2
commit
4a490d25a8
2 changed files with 24 additions and 24 deletions
|
@ -42,7 +42,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% with user|username as username %}
|
||||
{% if 'user/'|add:username|add:'/shelf' not in request.path and 'user/'|add:username|add:'/shelves' not in request.path %}
|
||||
{% if 'user/'|add:username|add:'/books' not in request.path %}
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
{% url 'user-feed' user|username as url %}
|
||||
|
|
|
@ -138,16 +138,8 @@ urlpatterns = [
|
|||
views.Following.as_view(),
|
||||
name="user-following",
|
||||
),
|
||||
re_path(r"%s/shelves/?$" % user_path, views.user_shelves_page, name="user-shelves"),
|
||||
re_path(r"%s/lists/?$" % user_path, views.UserLists.as_view(), name="user-lists"),
|
||||
# goals
|
||||
re_path(
|
||||
r"%s/goal/(?P<year>\d{4})/?$" % user_path,
|
||||
views.Goal.as_view(),
|
||||
name="user-goal",
|
||||
),
|
||||
re_path(r"^hide-goal/?$", views.hide_goal, name="hide-goal"),
|
||||
# lists
|
||||
re_path(r"%s/lists/?$" % user_path, views.UserLists.as_view(), name="user-lists"),
|
||||
re_path(r"^list/?$", views.Lists.as_view(), name="lists"),
|
||||
re_path(r"^list/(?P<list_id>\d+)(.json)?/?$", views.List.as_view(), name="list"),
|
||||
re_path(r"^list/add-book/?$", views.list.add_book, name="list-add-book"),
|
||||
|
@ -159,6 +151,28 @@ urlpatterns = [
|
|||
re_path(
|
||||
r"^list/(?P<list_id>\d+)/curate/?$", views.Curate.as_view(), name="list-curate"
|
||||
),
|
||||
# shelf
|
||||
re_path(r"%s/books/?$" % user_path, views.user_shelves_page, name="user-shelves"),
|
||||
re_path(
|
||||
r"^%s/books/(?P<shelf_identifier>[\w-]+)(.json)?/?$" % user_path,
|
||||
views.Shelf.as_view(),
|
||||
name="shelf",
|
||||
),
|
||||
re_path(
|
||||
r"^%s/books/(?P<shelf_identifier>[\w-]+)(.json)?/?$" % local_user_path,
|
||||
views.Shelf.as_view(),
|
||||
),
|
||||
re_path(r"^create-shelf/?$", views.create_shelf, name="shelf-create"),
|
||||
re_path(r"^delete-shelf/(?P<shelf_id>\d+)?$", views.delete_shelf),
|
||||
re_path(r"^shelve/?$", views.shelve),
|
||||
re_path(r"^unshelve/?$", views.unshelve),
|
||||
# goals
|
||||
re_path(
|
||||
r"%s/goal/(?P<year>\d{4})/?$" % user_path,
|
||||
views.Goal.as_view(),
|
||||
name="user-goal",
|
||||
),
|
||||
re_path(r"^hide-goal/?$", views.hide_goal, name="hide-goal"),
|
||||
# preferences
|
||||
re_path(r"^preferences/profile/?$", views.EditUser.as_view(), name="prefs-profile"),
|
||||
re_path(r"^preferences/password/?$", views.ChangePassword.as_view()),
|
||||
|
@ -199,20 +213,6 @@ urlpatterns = [
|
|||
re_path(r"^tag/(?P<tag_id>.+)/?$", views.Tag.as_view()),
|
||||
re_path(r"^tag/?$", views.AddTag.as_view()),
|
||||
re_path(r"^untag/?$", views.RemoveTag.as_view()),
|
||||
# shelf
|
||||
re_path(
|
||||
r"^%s/shelf/(?P<shelf_identifier>[\w-]+)(.json)?/?$" % user_path,
|
||||
views.Shelf.as_view(),
|
||||
name="shelf",
|
||||
),
|
||||
re_path(
|
||||
r"^%s/shelf/(?P<shelf_identifier>[\w-]+)(.json)?/?$" % local_user_path,
|
||||
views.Shelf.as_view(),
|
||||
),
|
||||
re_path(r"^create-shelf/?$", views.create_shelf, name="shelf-create"),
|
||||
re_path(r"^delete-shelf/(?P<shelf_id>\d+)?$", views.delete_shelf),
|
||||
re_path(r"^shelve/?$", views.shelve),
|
||||
re_path(r"^unshelve/?$", views.unshelve),
|
||||
# reading progress
|
||||
re_path(r"^edit-readthrough/?$", views.edit_readthrough, name="edit-readthrough"),
|
||||
re_path(r"^delete-readthrough/?$", views.delete_readthrough),
|
||||
|
|
Loading…
Reference in a new issue