Repository navigation
Expand file tree
/
Copy pathurls.py
More file actions
69 lines (60 loc) · 3.46 KB
/
Copy pathurls.py
File metadata and controls
69 lines (60 loc) · 3.46 KB
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
"""URL configuration for the hoagieplan project.
The `urlpatterns` list routes URLs to views, allowing different sections of the
site to be accessed via HTTP requests. This file connects URL patterns with
corresponding views, ensuring the right logic is executed for each route.
For more information, please see the Django URL dispatcher documentation at:
https://docs.djangoproject.com/en/5.1/topics/http/urls/
Copyright © 2021-2025 Hoagie Club and affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree or at
https://github.com/hoagieclub/plan/LICENSE.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from django.contrib import admin
from django.urls import path
from hoagieplan.api.auth import csrf
from hoagieplan.api.calendar import ical_generator
from hoagieplan.api.calendar.calendar_configuration_view import CalendarConfigurationView
from hoagieplan.api.calendar.calendar_event_view import CalendarEventView
from hoagieplan.api.dashboard import almost_completed_api, details, program_details_api, requirements, search, upload
from hoagieplan.api.profile import info, tutorial
urlpatterns = [
# Admin
path("admin/", admin.site.urls),
# CSRF Token for approving POST requests
path("csrf/", csrf.csrf_token_view, name="csrf"),
# Profile
path("profile/get_user/", info.get_user, name="get_user"),
path("profile/update/", info.update_profile, name="update_profile"),
path("profile/class-year/", info.update_class_year, name="update_class_year"),
# Tutorial
path("tutorial/get-status/", tutorial.get_status, name="get_tutorial_status"),
path("tutorial/set-status/", tutorial.set_status, name="set_tutorial_status"),
# Dashboard
path("search/", search.search_courses, name="search"),
path("fetch_courses/", info.get_user_courses, name="fetch_courses"),
path("update_courses/", requirements.update_courses, name="update_courses"),
path("update_transcript_courses/", requirements.update_transcript_courses, name="update_transcript_courses"),
path("manually_settle/", requirements.manually_settle, name="manually_settle"),
path("mark_satisfied/", requirements.mark_satisfied, name="mark_satisfied"),
path("update_requirements/", requirements.update_requirements, name="update_requirements"),
path("requirement_info/", requirements.requirement_info, name="requirement_info"),
path("course/details/", details.course_details, name="course_details"),
path("course/comments/", details.course_comments_view, name="course_comments"),
path("course/terms/", details.course_terms, name="course_terms"),
path("upload/", upload.upload_file, name="upload_file"),
path("almost_completed/", almost_completed_api.almost_completed, name="almost_completed"),
path("program_details/<str:code>/", program_details_api.program_details, name="program_details"),
# Calendar
path("export-calendar/", ical_generator.export_calendar_view, name="export_calendar"),
path("calendars/<int:term>/", CalendarConfigurationView.as_view(), name="calendars"),
path(
"calendar_events/<str:calendar_name>/<int:term>/",
CalendarEventView.as_view(),
name="calendar_events",
),
]