Exemple #1
0
from django.urls import path
from manager.views import hello, MyPage, Addlike, AddCommentlike, DeleteLike, BookPage, AddRate2Book

urlpatterns = [
    path('hello/<str:name>/', hello),
    path('hello/<str:name>/', hello),
    path('hello/', hello),
    path('click_the_book/<int:id>/', BookPage.as_view(),
         name='click_the_book'),
    path('add_like/<int:id>/', Addlike.as_view(), name='add_like'),
    path('add_comment_like/<int:id>/',
         AddCommentlike.as_view(),
         name='add_comment_like'),
    path('delete_like/<int:id>/', DeleteLike.as_view(), name='delete_like'),
    path('add_rate_to_book/<int:id>/<str:rate>/',
         AddRate2Book.as_view(),
         name='add-rate'),
    path('', MyPage.as_view(), name='the-main-page'),
]
Exemple #2
0
from django.urls import path
from manager.views import MyPage, AddLike2Comment, AddRate2Book, BookDetail, AddBook
from manager.views import LoginView, Logout_user, book_delete, UpdateBook, RegisterView

urlpatterns = [
    path('add_like_to_comment/<int:id>/',
         AddLike2Comment.as_view(),
         name='add-like-to-comment'),
    path('add-rate-to-book/<str:slug>/<int:rate>/',
         AddRate2Book.as_view(),
         name="add-rate"),
    path('add-rate-to-book/<str:slug>/<int:rate>/<str:location>/',
         AddRate2Book.as_view(),
         name="add-rate-location"),
    path('book_view_detail/<str:slug>/',
         BookDetail.as_view(),
         name="book-detail"),
    path('add_book/', AddBook.as_view(), name='add-book'),
    path('login/', LoginView.as_view(), name="login"),
    path('register/', RegisterView.as_view(), name="register"),
    path('logout/', Logout_user, name="logout"),
    path('delete_book/<str:slug>/', book_delete, name='delete-book'),
    path('update_book/<str:slug>/', UpdateBook.as_view(), name='update-book'),
    path("", MyPage.as_view(), name="the-main-page"),
]
Exemple #3
0
         name="add-rate"),
    path("add_rate_to_book/<str:slug>/<int:rate>/<str:location>/",
         AddRate2Book.as_view(),
         name="add-rate-location"),
    path("book_view_detail/<str:slug>/",
         BookDetail.as_view(),
         name="book-detail"),
    path("add-book/", AddBook.as_view(), name="add-book"),
    path("add-comment-location/<str:slug>/<str:location>/",
         AddComment.as_view(),
         name="add-comment-location"),
    path("login/", LoginView.as_view(), name="login"),
    path("register/", RegisterView.as_view(), name='register'),
    path("logout/", logout_user, name="logout"),
    path("delete_book/<str:slug>/", book_delete, name="delete-book"),
    path("update_book/<str:slug>/", UpdateBook.as_view(), name="update-book"),
    path("update_book_author/<str:slug>/",
         UpdateBookAuthor.as_view(),
         name="update-book-author"),
    path("delete_comment/<str:slug>/<int:id_comment>/",
         comment_delete,
         name="delete-comment"),
    path("update_comment/<str:slug>/<int:id_comment>/",
         UpdateComment.as_view(),
         name="update-comment"),
    path("personal_page/", personal_view, name="the-personal-page"),
    path("git/", git_callback, name="git-callback"),
    path("", cache_page(20)(MyPage.as_view()), name="the-main-page"),
    # path("", MyPage.as_view(), name="the-main-page"),  # without cache
]