-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,19 @@ | ||
from django.urls import path | ||
from django.views.decorators.cache import cache_page | ||
from backend.utils.cache import MINUTE_IN_SECONDS, MONTH_IN_SECONDS_APPROX | ||
|
||
from laundry.views import ( | ||
HallInfo, | ||
HallUsage, | ||
Ids, | ||
MultipleHallInfo, | ||
Preferences, | ||
Status, | ||
) | ||
from laundry.views import HallInfo, HallUsage, Ids, MultipleHallInfo, Preferences, Status | ||
from utils.cache import MINUTE_IN_SECONDS, MONTH_IN_SECONDS_APPROX | ||
|
||
|
||
urlpatterns = [ | ||
path( | ||
"hall/<hall_id>/", | ||
cache_page(MINUTE_IN_SECONDS)(HallInfo), | ||
name="hall-info", | ||
), | ||
path( | ||
"usage/<hall_id>/", | ||
cache_page(MINUTE_IN_SECONDS)(HallUsage), | ||
name="hall-usage", | ||
), | ||
path("hall/<hall_id>/", cache_page(MINUTE_IN_SECONDS)(HallInfo), name="hall-info",), | ||
path("usage/<hall_id>/", cache_page(MINUTE_IN_SECONDS)(HallUsage), name="hall-usage",), | ||
path( | ||
"rooms/<hall_ids>", | ||
cache_page(MINUTE_IN_SECONDS)(MultipleHallInfo), | ||
name="multiple-hall-info", | ||
), | ||
path( | ||
"halls/ids/", | ||
cache_page(MONTH_IN_SECONDS_APPROX)(Ids), | ||
name="hall-ids", | ||
), | ||
path( | ||
"status/", | ||
cache_page(30)(Status), | ||
name="status", | ||
), | ||
path("halls/ids/", cache_page(MONTH_IN_SECONDS_APPROX)(Ids), name="hall-ids",), | ||
path("status/", cache_page(30)(Status), name="status",), | ||
path("preferences/", Preferences.as_view(), name="preferences"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters