Fakultas Ilmu Komputer UI

urls.py 5.8 KB
Newer Older
WILLIAM GATES's avatar
WILLIAM GATES committed
1
from django import urls
2
from knox import views as knox_views
WILLIAM GATES's avatar
WILLIAM GATES committed
3

4
from api import views as api_views
WILLIAM GATES's avatar
WILLIAM GATES committed
5
6

urlpatterns = [
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    urls.path('auth/register/', api_views.AuthRegister.as_view(), name='auth-register'),
    urls.path('auth/cred-login/', api_views.AuthCredLogin.as_view(), name='auth-cred-login'),
    urls.path(
        'auth/phone-number-login/',
        api_views.AuthPhoneNumberLogin.as_view(),
        name='auth-phone-number-login'
    ),
    urls.path('auth/otp-login/', api_views.AuthOTPLogin.as_view(), name='auth-otp-login'),
    urls.path('auth/resend-otp/', api_views.AuthResendOTP.as_view(), name='auth-resend-otp'),
    urls.path('auth/logout/', knox_views.LogoutView.as_view(), name='auth-logout'),
    urls.path('auth/logout-all/', knox_views.LogoutAllView.as_view(), name='auth-logout-all'),
    urls.path('cart/update/', api_views.CartUpdate.as_view(), name='cart-update'),
    urls.path('cart/overview/', api_views.CartOverview.as_view(), name='cart-overview'),
    urls.path('cart/checkout/', api_views.CartCheckout.as_view(), name='cart-checkout'),
    urls.path('cart/upload-pop/', api_views.CartUploadPOP.as_view(), name='cart-upload-pop'),
    urls.path(
        'cart/complete-transaction/',
        api_views.CartCompleteTransaction.as_view(),
        name='cart-complete-transaction'
    ),
    urls.path(
        'cart/cancel-transaction/',
        api_views.CartCancelTransaction.as_view(),
        name='cart-cancel-transaction'
    ),
    urls.path('donation/create/', api_views.DonationCreate.as_view(), name='donation-create'),
Azhar Difa Arnanda's avatar
Dev    
Azhar Difa Arnanda committed
33
    urls.path('donation/delete-by-p/<str:pid>', api_views.delete_donation_by_program, name='donation-by-program'),
34
35
36
37
38
    urls.path(
        'donation/reupload-proof-of-bank-transfer/',
        api_views.DonationReuploadProofOfBankTransfer.as_view(),
        name='donation-reupload-proof-of-bank-transfer'
    ),
WILLIAM GATES's avatar
WILLIAM GATES committed
39
40
    urls.path(
        'reports/transaction/',
inez nabila's avatar
inez nabila committed
41
42
        api_views.ReportTransaction.as_view(),
        name='transaction-report'
Rayhan Arwindra's avatar
Rayhan Arwindra committed
43
        ),
WILLIAM GATES's avatar
WILLIAM GATES committed
44
    urls.path(
Rayhan Muzakki's avatar
Pbi5    
Rayhan Muzakki committed
45
46
47
        'reports/program-donation/csh',
        api_views.ReportProgramDonationCSH.as_view(),
        name='program-donation-report-csh'
WILLIAM GATES's avatar
WILLIAM GATES committed
48
    ),
Rayhan Muzakki's avatar
Pbi 5    
Rayhan Muzakki committed
49
50
51
52
53
    urls.path(
        'reports/program-donation/gds',
        api_views.ReportProgramDonationGDS.as_view(),
        name='program-donation-report-gds'
    ),
inez nabila's avatar
inez nabila committed
54

55
56
    urls.path('users/', api_views.UserList.as_view(), name='user-list'),
    urls.path('users/<str:pk>/', api_views.UserDetail.as_view(), name='user-detail'),
WILLIAM GATES's avatar
WILLIAM GATES committed
57
58
59
60
61
62
63
64
65
66
    urls.path(
        'bank-account-transfer-destinations/',
        api_views.BankAccountTransferDestinationList.as_view(),
        name='bank-account-transfer-destination-list'
    ),
    urls.path(
        'bank-account-transfer-destinations/<str:pk>/',
        api_views.BankAccountTransferDestinationDetail.as_view(),
        name='bank-account-transfer-destination-detail'
    ),
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    urls.path('categories/', api_views.CategoryList.as_view(), name='category-list'),
    urls.path('categories/<str:pk>/', api_views.CategoryDetail.as_view(), name='category-detail'),
    urls.path('subcategories/', api_views.SubcategoryList.as_view(), name='subcategory-list'),
    urls.path(
        'subcategories/<str:pk>/',
        api_views.SubcategoryDetail.as_view(),
        name='subcategory-detail'
    ),
    urls.path('products/', api_views.ProductList.as_view(), name='product-list'),
    urls.path('products/<str:pk>/', api_views.ProductDetail.as_view(), name='product-detail'),
    urls.path('shopping-carts/', api_views.ShoppingCartList.as_view(), name='shopping-cart-list'),
    urls.path(
        'shopping-carts/<str:pk>/',
        api_views.ShoppingCartDetail.as_view(),
        name='shopping-cart-detail'
    ),
    urls.path('transactions/', api_views.TransactionList.as_view(), name='transaction-list'),
    urls.path(
WILLIAM GATES's avatar
WILLIAM GATES committed
85
        'transactions/<str:pk>/',
86
87
88
89
90
        api_views.TransactionDetail.as_view(),
        name='transaction-detail'
    ),
    urls.path('programs/', api_views.ProgramList.as_view(), name='program-list'),
    urls.path('programs/<str:pk>/', api_views.ProgramDetail.as_view(), name='program-detail'),
inez nabila's avatar
inez nabila committed
91
92
93
94
95
    urls.path(
        'programs/<str:program>/progress',
        api_views.ProgramProgressList.as_view(),
        name='program-progress-list'
    ),
96
    urls.path(
Rayhan Muzakki's avatar
Pbi3    
Rayhan Muzakki committed
97
98
99
100
101
102
103
104
        'program-donations/csh',
        api_views.ProgramDonationListCSH.as_view(),
        name='program-donation-csh-list'
    ),
    urls.path(
        'program-donations/gds',
        api_views.ProgramDonationListGDS.as_view(),
        name='program-donation-gds-list'
105
    ),
Rayhan Muzakki's avatar
Pbi67    
Rayhan Muzakki committed
106
107
108
109
110
    urls.path(
        'program-donations/',
        api_views.ProgramDonationList.as_view(),
        name='program-donation-list'
    ),
111
112
113
114
115
116
117
118
    urls.path(
        'program-donations/<str:pk>/',
        api_views.ProgramDonationDetail.as_view(),
        name='program-donation-detail'
    ),
    urls.path(
        'choices/payment-method/',
        api_views.PaymentMethodChoices.as_view(),
WILLIAM GATES's avatar
WILLIAM GATES committed
119
        name='payment-method-choice'
120
121
122
123
    ),
    urls.path(
        'choices/transaction-status/',
        api_views.TransactionStatusChoices.as_view(),
WILLIAM GATES's avatar
WILLIAM GATES committed
124
        name='transaction-status-choice'
125
126
127
128
    ),
    urls.path(
        'choices/donation-status/',
        api_views.DonationStatusChoices.as_view(),
WILLIAM GATES's avatar
WILLIAM GATES committed
129
        name='donation-status-choice'
130
131
132
    ),
    urls.path('configs/app/', api_views.AppConfigDetail.as_view(), name='app-config-detail'),
    urls.path(
WILLIAM GATES's avatar
WILLIAM GATES committed
133
134
135
        'configs/help-contact/',
        api_views.HelpContactConfigDetail.as_view(),
        name='help-contact-config-detail'
136
137
138
139
140
141
    ),
    urls.path(
        'configs/shipment/',
        api_views.ShipmentConfigDetail.as_view(),
        name='shipment-config-detail'
    ),
142
    urls.path('batch/', api_views.BatchList.as_view(), name='batch-list'),
143
    urls.path('batch/<str:pk>/', api_views.BatchDetail.as_view(), name='batch-detail'),
144
    urls.path('batch/create/', api_views.BatchCreate.as_view(), name='batch-create'),
WILLIAM GATES's avatar
WILLIAM GATES committed
145
]