~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/publishing.py

Semesters now have separate URL name, display name and code attributes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
@forward_route(ApplicationRoot, '+semesters', argc=2)
38
38
def root_to_semester(root, year, semester):
39
 
    return root.store.find(Semester, year=year, semester=semester).one()
 
39
    return root.store.find(Semester, year=year, url_name=semester).one()
40
40
 
41
41
@forward_route(Subject, argc=2)
42
42
def subject_to_offering(subject, year, semester):
76
76
 
77
77
@reverse_route(Semester)
78
78
def semester_url(semester):
79
 
    return (ROOT, ('+semesters', semester.year, semester.semester))
 
79
    return (ROOT, ('+semesters', semester.year, semester.url_name))
80
80
 
81
81
@reverse_route(Offering)
82
82
def offering_url(offering):
83
83
    return (offering.subject, (offering.semester.year,
84
 
                               offering.semester.semester))
 
84
                               offering.semester.url_name))
85
85
 
86
86
@reverse_route(ProjectSet)
87
87
def projectset_url(project_set):