forked from pennlabs/penn-courses
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add degree list and degree detail views
- Loading branch information
Showing
6 changed files
with
81 additions
and
58 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
20 changes: 20 additions & 0 deletions
20
backend/degree/migrations/0003_degreeplan_unique degreeplan.py
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 3.2.20 on 2023-11-12 17:58 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("degree", "0002_auto_20231027_1120"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddConstraint( | ||
model_name="degreeplan", | ||
constraint=models.UniqueConstraint( | ||
fields=("program", "degree", "major", "concentration", "year"), | ||
name="unique degreeplan", | ||
), | ||
), | ||
] |
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
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,25 +1,11 @@ | ||
from django.urls import path | ||
from degree import views | ||
from degree.views import DegreeListSearch | ||
from degree.views import DegreeList, DegreeDetail | ||
|
||
urlpatterns = [ | ||
path("degrees/<int:year>", DegreeList.as_view(), name="degree-list"), | ||
path( | ||
"degrees/", | ||
views.DegreeList.as_view(), | ||
name="degree-list"), | ||
path( | ||
"search/degrees/", | ||
DegreeListSearch.as_view(), | ||
name="degree-search", | ||
), | ||
path( | ||
"degrees/<slug:graduation>/<slug:full_code>/", | ||
views.DegreeDetail.as_view(), | ||
"degree_detail/<pk>", | ||
DegreeDetail.as_view(), | ||
name="degree-detail", | ||
), | ||
path( | ||
"rules/", | ||
views.RuleList.as_view(), | ||
name="rule-list" | ||
) | ||
] |
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
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