app/soc/logic/models/request.py
changeset 620 e74e0b74625f
parent 619 7b61da3d4306
child 631 3763d36bcebc
--- a/app/soc/logic/models/request.py	Sat Nov 29 22:48:15 2008 +0000
+++ b/app/soc/logic/models/request.py	Sat Nov 29 23:51:24 2008 +0000
@@ -30,6 +30,8 @@
 from soc.logic.models import base
 from soc.logic.models import user as user_logic
 
+from soc.views.helper import redirects
+
 import os
 
 import soc.models.request
@@ -98,7 +100,7 @@
     # create the invitation_url
     invitation_url = "%(host)s%(index)s" % {
                           'host' : os.environ['HTTP_HOST'], 
-                          'index': self.inviteAcceptedRedirect(entity, None)
+                          'index': redirects.inviteAcceptedRedirect(entity, None)
                           }
 
     # get the group entity
@@ -122,11 +124,5 @@
     mail_dispatcher.sendMailFromTemplate('soc/mail/invitation.html', 
                                          messageProperties)
 
-  def inviteAcceptedRedirect(self, entity, _):
-    """Returns the redirect for accepting an invite
-    """
-
-    return '/%s/create/%s/%s' % (
-        entity.role, entity.scope_path, entity.link_id)
 
 logic = Logic()