Fakultas Ilmu Komputer UI

urls.py 2.76 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,
6
                       SuksesLoginAdminView, SuksesLoginKontributorView, DownloadHistoryView,
7
                       SuntingProfilView, UploadMateriHTML, UploadMateriView, UploadMateriExcelView, PostsView,
insan ramadhan's avatar
insan ramadhan committed
8
                       ReqMateriView, KatalogPerKontributorView, MateriFavorite, PasswordChangeViews, password_success, SubmitVisitorView)
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("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
19
    path("materi/<int:pk>/delete", views.delete_materi, name="detele-materi"),
20
21
    path("materi/<int:pk>/unduh", views.download_materi, name="download-materi"),
    path("materi/<int:pk>/view", views.view_materi, name="view-materi"),
22
    path("dashboard/", DashboardKontributorView.as_view(), name="dashboard"),
23
    path("download-history/", DownloadHistoryView.as_view(), name="download-history"),
24
    path("revisi/materi/<int:pk>/", views.RevisiMateriView.as_view(), name="revisi"),
25
    path("unggah/", UploadMateriView.as_view(), name="unggah"),
26
    path("unggah_excel/", UploadMateriExcelView.as_view(), name="unggah_excel"),
27
    path("profil/", ProfilView.as_view(), name="profil"),
28
    path("sunting/", SuntingProfilView.as_view(), name="sunting"),
29
30
    path("sukses-kontributor/", SuksesLoginKontributorView.as_view(),
         name="sukses-kontributor"),
31
    path("sukses-admin/", SuksesLoginAdminView.as_view(), name="sukses-admin"),
32
    re_path(r"^.*\.html", views.pages, name="pages"),
33
    path("posts/", PostsView.as_view(), name='posts'),
34
    path("req-materi/", ReqMateriView.as_view(), name="req-materi"),
35
36
    path("profil/<str:email>/", KatalogPerKontributorView.as_view(),
         name="katalog-per-kontributor"),
37
    path("materi/rate/", views.add_rating_materi, name="rate-materi"),
38
    path("materi/<int:pk>/save-to-gdrive/", views.save_to_gdrive, name="save-to-gdrive"),
39
    path("favorite/", MateriFavorite.as_view(), name="favorite"),
Yaumi's avatar
Yaumi committed
40
    path("change-password/", PasswordChangeViews.as_view(template_name='change-password.html')),
Yaumi's avatar
Yaumi committed
41
    path("password_success/", views.password_success, name="password_success"),
42
    path("given-rating/", views.see_given_rating, name="see_given_rating"),
insan ramadhan's avatar
insan ramadhan committed
43
    path("submit-visitor/", SubmitVisitorView.as_view(), name="submit-visitor"),
igor lestin sianipar's avatar
igor lestin sianipar committed
44
]