Fakultas Ilmu Komputer UI

urls.py 4.03 KB
Newer Older
1
from django.contrib.auth import views as auth_views
Samuel Dimas's avatar
Samuel Dimas committed
2
from django.urls import path, re_path
3

Samuel Dimas's avatar
Samuel Dimas committed
4
from app import views
5
from app.views import (DashboardKontributorView, ProfilView, StatisticsView,
6
                       SuksesLoginAdminView, SuksesLoginKontributorView, DownloadHistoryView,
7
                       SuntingProfilView, UploadMateriHTML, UploadMateriView, UploadMateriExcelView, PostsView,
8
                       ReqMateriView, KatalogPerKontributorView, MateriFavorite, PasswordChangeViews, password_success, SubmitVisitorView, GuestBookView, ReadLaterView, MostContributor)
9
10


Samuel Dimas's avatar
Samuel Dimas committed
11
urlpatterns = [
12
13
    path("", views.DaftarKatalog.as_view(), name="daftar_katalog"),
    path("materi/<int:pk>/", views.DetailMateri.as_view(), name="detail-materi"),
14
    path("materi/like/", views.toggle_like, name="PostLikeToggle"),
15
16
    path("delete/<int:pk_materi>/<int:pk_comment>",
         views.delete_comment, name="delete-comment"),
17
18
    path("review/delete/<int:pk_materi>/<int:pk_review>",
        views.delete_review, name="delete-review"),
19
    path("comment/like/", views.toggle_like_comment, name="comment-like-toggle"),
20
21
    path("comment/dislike/", views.toggle_dislike_comment,
         name="comment-dislike-toggle"),
Selvy Fitriani's avatar
Selvy Fitriani committed
22
    path("materi/<int:pk>/delete", views.delete_materi, name="detele-materi"),
23
24
    path("materi/<int:pk>/unduh", views.download_materi, name="download-materi"),
    path("materi/<int:pk>/view", views.view_materi, name="view-materi"),
25
    path("dashboard/", DashboardKontributorView.as_view(), name="dashboard"),
26
27
28
29
    path("download-history/", DownloadHistoryView.as_view(),
         name="download-history"),
    path("revisi/materi/<int:pk>/",
         views.RevisiMateriView.as_view(), name="revisi"),
30
    path("unggah/", UploadMateriView.as_view(), name="unggah"),
31
    path("unggah_excel/", UploadMateriExcelView.as_view(), name="unggah_excel"),
32
    path("profil/", ProfilView.as_view(), name="profil"),
33
    path("sunting/", SuntingProfilView.as_view(), name="sunting"),
34
35
    path("sukses-kontributor/", SuksesLoginKontributorView.as_view(),
         name="sukses-kontributor"),
36
    path("sukses-admin/", SuksesLoginAdminView.as_view(), name="sukses-admin"),
37
    re_path(r"^.*\.html", views.pages, name="pages"),
38
    path("posts/", PostsView.as_view(), name='posts'),
39
    path("req-materi/", ReqMateriView.as_view(), name="req-materi"),
40
41
    path("profil/<str:email>/", KatalogPerKontributorView.as_view(),
         name="katalog-per-kontributor"),
42
    path("materi/rate/", views.add_rating_materi, name="rate-materi"),
43
44
    path("materi/<int:pk>/save-to-gdrive/",
         views.save_to_gdrive, name="save-to-gdrive"),
45
    path("favorite/", MateriFavorite.as_view(), name="favorite"),
46
47
    path("change-password/",
         PasswordChangeViews.as_view(template_name='change-password.html')),
Yaumi's avatar
Yaumi committed
48
    path("password_success/", views.password_success, name="password_success"),
49
    path("given-rating/", views.see_given_rating, name="see_given_rating"),
insan ramadhan's avatar
insan ramadhan committed
50
    path("submit-visitor/", SubmitVisitorView.as_view(), name="submit-visitor"),
Anthony Dewa Priyasembada's avatar
Anthony Dewa Priyasembada committed
51
52
    path("baca-nanti/", ReadLaterView.as_view(), name="read-later"),
    path("baca-nanti-toggle/", views.toggle_readlater, name="toggle-read-later"),
53
    path("stats/", StatisticsView.as_view(), name="stats"),
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
    path("reset_password/",
         auth_views.PasswordResetView.as_view(
             template_name="password_reset.html"),
         name="reset_password"),
    path("reset_password_sent/",
         auth_views.PasswordResetDoneView.as_view(
             template_name="password_reset_sent.html"),
         name="password_reset_done"),
    path("reset/<uidb64>/<token>/",
         auth_views.PasswordResetConfirmView.as_view(
             template_name="password_reset_form.html"),
         name="password_reset_confirm"),
    path("reset_password_complete/",
         auth_views.PasswordResetCompleteView.as_view(
             template_name="password_reset_done.html"),
         name="password_reset_complete"),
    path("most-contributor/", MostContributor.as_view(), name="most-contributor"),
    path("guest-book/", GuestBookView.as_view(), name="guest-book")
igor lestin sianipar's avatar
igor lestin sianipar committed
72
]