Fakultas Ilmu Komputer UI

urls.py 3.67 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,
Anthony Dewa Priyasembada's avatar
Anthony Dewa Priyasembada committed
8
9
                       ReqMateriView, KatalogPerKontributorView, MateriFavorite, PasswordChangeViews, password_success, 
                       SubmitVisitorView, ReadLaterView)
10
11


Samuel Dimas's avatar
Samuel Dimas committed
12
urlpatterns = [
13
14
    path("", views.DaftarKatalog.as_view(), name="daftar_katalog"),
    path("materi/<int:pk>/", views.DetailMateri.as_view(), name="detail-materi"),
15
    path("materi/like/", views.toggle_like, name="PostLikeToggle"),
16
17
    path("delete/<int:pk_materi>/<int:pk_comment>",
         views.delete_comment, name="delete-comment"),
18
19
    path("comment/like/", views.toggle_like_comment, name="comment-like-toggle"),
    path("comment/dislike/", views.toggle_dislike_comment, name="comment-dislike-toggle"),
Selvy Fitriani's avatar
Selvy Fitriani committed
20
    path("materi/<int:pk>/delete", views.delete_materi, name="detele-materi"),
21
22
    path("materi/<int:pk>/unduh", views.download_materi, name="download-materi"),
    path("materi/<int:pk>/view", views.view_materi, name="view-materi"),
23
    path("dashboard/", DashboardKontributorView.as_view(), name="dashboard"),
24
    path("download-history/", DownloadHistoryView.as_view(), name="download-history"),
25
    path("revisi/materi/<int:pk>/", views.RevisiMateriView.as_view(), name="revisi"),
26
    path("unggah/", UploadMateriView.as_view(), name="unggah"),
27
    path("unggah_excel/", UploadMateriExcelView.as_view(), name="unggah_excel"),
28
    path("profil/", ProfilView.as_view(), name="profil"),
29
    path("sunting/", SuntingProfilView.as_view(), name="sunting"),
30
31
    path("sukses-kontributor/", SuksesLoginKontributorView.as_view(),
         name="sukses-kontributor"),
32
    path("sukses-admin/", SuksesLoginAdminView.as_view(), name="sukses-admin"),
33
    re_path(r"^.*\.html", views.pages, name="pages"),
34
    path("posts/", PostsView.as_view(), name='posts'),
35
    path("req-materi/", ReqMateriView.as_view(), name="req-materi"),
36
37
    path("profil/<str:email>/", KatalogPerKontributorView.as_view(),
         name="katalog-per-kontributor"),
38
    path("materi/rate/", views.add_rating_materi, name="rate-materi"),
39
    path("materi/<int:pk>/save-to-gdrive/", views.save_to_gdrive, name="save-to-gdrive"),
40
    path("favorite/", MateriFavorite.as_view(), name="favorite"),
Yaumi's avatar
Yaumi committed
41
    path("change-password/", PasswordChangeViews.as_view(template_name='change-password.html')),
Yaumi's avatar
Yaumi committed
42
    path("password_success/", views.password_success, name="password_success"),
43
    path("given-rating/", views.see_given_rating, name="see_given_rating"),
insan ramadhan's avatar
insan ramadhan committed
44
    path("submit-visitor/", SubmitVisitorView.as_view(), name="submit-visitor"),
Anthony Dewa Priyasembada's avatar
Anthony Dewa Priyasembada committed
45
46
    path("baca-nanti/", ReadLaterView.as_view(), name="read-later"),
    path("baca-nanti-toggle/", views.toggle_readlater, name="toggle-read-later"),
47
    path("stats/", StatisticsView.as_view(), name="stats"),
48
49
50
51
52
53
54
55
56
57
58
59
    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"),
igor lestin sianipar's avatar
igor lestin sianipar committed
60
]