Fakultas Ilmu Komputer UI

urls.py 2.83 KB
Newer Older
Samuel Dimas's avatar
Samuel Dimas committed
1
from django.urls import path, re_path
2

Samuel Dimas's avatar
Samuel Dimas committed
3
from app import views
4
from app.views import (DashboardKontributorView, ProfilKontributorView,
5
                       SuksesLoginAdminView, SuksesLoginKontributorView, DownloadHistoryView,
6
                       SuntingProfilView, UploadMateriHTML, UploadMateriView, UploadMateriExcelView,
7
                       ProfilAdminView, PostsView, SuntingProfilAdminView,
8
                       ReqMateriView, KatalogPerKontributorView, MateriFavorite, PasswordChangeViews, password_success)
Yaumi's avatar
Yaumi committed
9
from django.contrib.auth import views as auth_views
Samuel Dimas's avatar
Samuel Dimas committed
10
urlpatterns = [
11
12
    path("", views.DaftarKatalog.as_view(), name="daftar_katalog"),
    path("materi/<int:pk>/", views.DetailMateri.as_view(), name="detail-materi"),
13
    path("materi/like/", views.toggle_like, name="PostLikeToggle"),
14
15
    path("delete/<int:pk_materi>/<int:pk_comment>",
         views.delete_comment, name="delete-comment"),
16
17
    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
18
    path("materi/<int:pk>/delete", views.delete_materi, name="detele-materi"),
19
20
    path("materi/<int:pk>/unduh", views.download_materi, name="download-materi"),
    path("materi/<int:pk>/view", views.view_materi, name="view-materi"),
21
    path("dashboard/", DashboardKontributorView.as_view(), name="dashboard"),
22
    path("download-history/", DownloadHistoryView.as_view(), name="download-history"),
23
    path("revisi/materi/<int:pk>/", views.RevisiMateriView.as_view(), name="revisi"),
24
    path("unggah/", UploadMateriView.as_view(), name="unggah"),
25
    path("unggah_excel/", UploadMateriExcelView.as_view(), name="unggah_excel"),
26
27
    path("profil/", ProfilKontributorView.as_view(), name="profil"),
    path("sunting/", SuntingProfilView.as_view(), name="sunting"),
28
29
    path("sukses-kontributor/", SuksesLoginKontributorView.as_view(),
         name="sukses-kontributor"),
30
    path("sukses-admin/", SuksesLoginAdminView.as_view(), name="sukses-admin"),
31
    re_path(r"^.*\.html", views.pages, name="pages"),
32
    path("profil-admin/", ProfilAdminView.as_view(), name="profil-admin"),
33
    path("posts/", PostsView.as_view(), name='posts'),
34
    path("sunting-admin/", SuntingProfilAdminView.as_view(), name="sunting-admin"),
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"),
igor lestin sianipar's avatar
igor lestin sianipar committed
43
]