# HG changeset patch # User Lennard de Rijk # Date 1239456877 0 # Node ID 7c8adb14c7fbd545932ea4dcae97bca807320be8 # Parent 3c3f0cd9873d55a6935208a85f0dc718e57658cd Added three new redirect methods. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r 3c3f0cd9873d -r 7c8adb14c7fb app/soc/views/helper/redirects.py --- a/app/soc/views/helper/redirects.py Sat Apr 11 13:32:35 2009 +0000 +++ b/app/soc/views/helper/redirects.py Sat Apr 11 13:34:37 2009 +0000 @@ -176,6 +176,16 @@ return result +def getListProjectsRedirect(entity, params): + """Returns the redirect for the List Projects page for the given entity. + """ + + result = '/%s/list_projects/%s' % ( + params['url_name'], entity.key().name()) + + return result + + def getListRequestsRedirect(entity, params): """Returns the redirect for the List Requests paged for the given Group entity and Group View params. @@ -279,6 +289,14 @@ params['url_name'], entity.key().name()) +def getStudentEditRedirect(entity, params): + """Returns the redirect for Students to edit their Projects. + """ + + return '/%s/st_edit/%s' % ( + params['url_name'], entity.key().name()) + + def getStudentProposalRedirect(entity, params): """Returns the student proposal redirect for the given org and student. """ @@ -289,6 +307,14 @@ return result +def getShowDuplicatesRedirect(entity, params): + """Returns the show duplicates redirect for the specified entity. + """ + + return'/%s/show_duplicates/%s' % ( + params['url_name'], entity.key().name()) + + def getSlotsRedirect(entity, params): """Returns the slots redirect for the specified entity. """