-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhttp_urls.py
91 lines (82 loc) · 2.89 KB
/
http_urls.py
1
2
3
4
5
6
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from bhawan_app.views.profile import ProfileViewset
from bhawan_app.views.contact import ContactViewset
from bhawan_app.views.facility import FacilityViewset
from bhawan_app.views.complaint import ComplaintViewset
from bhawan_app.views.item import ItemViewset
from bhawan_app.views.default_item import DefaultItemViewset
from bhawan_app.views.room_booking import RoomBookingViewset
from bhawan_app.views.personal_info import PersonalInfoView
from bhawan_app.views.event import EventViewset
from bhawan_app.views.complaint_time_slot import ComplaintTimeSlotViewset
from bhawan_app.views.hostel_admin import HostelAdminViewset
from bhawan_app.views.constant import ConstantViewset
from bhawan_app.views.resident import ResidentViewset
from bhawan_app.views.room import RoomViewset
from bhawan_app.views.student_accommodation import StudentAccommodationViewset
from bhawan_app.views.upload_bhawan_data import UploadBhawanDataViewset
app_name = "bhawan_app"
router = DefaultRouter()
router.register(
r"constants", ConstantViewset, basename="constant",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/complaint", ComplaintViewset, basename="complaint",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/item", ItemViewset, basename="item",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/default_item", DefaultItemViewset, basename="default_item",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/room_booking",
RoomBookingViewset,
basename="room_booking",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/facility", FacilityViewset, basename="facility",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/profile", ProfileViewset, basename="profle",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/contact", ContactViewset, basename="contact",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/event", EventViewset, basename="event",
),
router.register(
r"(?P<hostel__code>[\w\-]+)/resident", ResidentViewset, basename="resident",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/time_slot",
ComplaintTimeSlotViewset,
basename="time_slot",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/admin", HostelAdminViewset, basename="admin",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/room", RoomViewset, basename="room",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/student_accommodation", StudentAccommodationViewset, basename="student_accommodation",
)
router.register(
r"(?P<hostel__code>[\w\-]+)/upload_bhawan_data", UploadBhawanDataViewset, basename="upload_bhawan_data",
)
urlpatterns = [
path(
'personal_info/',
PersonalInfoView.as_view(),
name='personal_info',
),
path('accomodation_data/download/', StudentAccommodationViewset.as_view({
'get': 'download_all'
}),
name='accomodation_data_download',
),
]
urlpatterns += router.urls