# HG changeset patch # User Lennard de Rijk # Date 1232732490 0 # Node ID 7431d77701976f310a20cb547b029589f89ce7b7 # Parent df051fc9d7a1ec8a1bd1db1f99f2a5f9a49cc492 Renamed redirect methods to comply with the rest of the module. Added use for getInviteAcceptedRedirect in the soc/views/models/request.py process_invite view. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r df051fc9d7a1 -r 7431d7770197 app/soc/templates/soc/request/process_invite.html --- a/app/soc/templates/soc/request/process_invite.html Fri Jan 23 17:07:54 2009 +0000 +++ b/app/soc/templates/soc/request/process_invite.html Fri Jan 23 17:41:30 2009 +0000 @@ -28,7 +28,7 @@ - + diff -r df051fc9d7a1 -r 7431d7770197 app/soc/views/helper/redirects.py --- a/app/soc/views/helper/redirects.py Fri Jan 23 17:07:54 2009 +0000 +++ b/app/soc/views/helper/redirects.py Fri Jan 23 17:41:30 2009 +0000 @@ -94,20 +94,22 @@ return result -def inviteAcceptedRedirect(entity, _): +def getInviteAcceptedRedirect(entity, _): """Returns the redirect for accepting an invite. """ return '/%s/accept_invite/%s/%s' % ( entity.role, entity.scope_path, entity.link_id) -def inviteProcessRedirect(entity, _): + +def getInviteProcessRedirect(entity, _): """Returns the redirect for processing an invite """ return '/request/process_invite/%s/%s/%s' % ( entity.scope_path, entity.role, entity.link_id) + def getApplicantRedirect(entity, params): """Returns the redirect for processing accepted Applications. """ diff -r df051fc9d7a1 -r 7431d7770197 app/soc/views/models/request.py --- a/app/soc/views/models/request.py Fri Jan 23 17:07:54 2009 +0000 +++ b/app/soc/views/models/request.py Fri Jan 23 17:41:30 2009 +0000 @@ -149,6 +149,8 @@ # put the entity in the context context['entity'] = request_entity context['module_name'] = params['module_name'] + context['invite_accepted_redirect'] = ( + redirects.getInviteAcceptedRedirect(entity, self._params)) #display the invite processing page using the appropriate template template = params['invite_processing_template'] @@ -180,7 +182,7 @@ 'state' : 'group_accepted'} uh_params = params.copy() - uh_params['list_action'] = (redirects.inviteProcessRedirect, None) + uh_params['list_action'] = (redirects.getInviteProcessRedirect, None) uh_params['list_description'] = ugettext_lazy( "An overview of your unhandled invites.")