Enable pick links for all the references we have
authorSverre Rabbelier <srabbelier@gmail.com>
Fri, 23 Jan 2009 21:22:09 +0000
changeset 936 b3e1e0c9649c
parent 935 09f47e08f805
child 937 9c930fa3661c
Enable pick links for all the references we have Patch by: Sverre Rabbelier
app/soc/models/document.py
app/soc/models/group_app.py
app/soc/models/org_app.py
app/soc/models/presence.py
app/soc/models/user.py
--- a/app/soc/models/document.py	Fri Jan 23 21:20:33 2009 +0000
+++ b/app/soc/models/document.py	Fri Jan 23 21:22:09 2009 +0000
@@ -38,4 +38,7 @@
 
     work.content:  the rich-text contents of the Document
   """
+
+  URL_NAME = 'document'
+
   pass
\ No newline at end of file
--- a/app/soc/models/group_app.py	Fri Jan 23 21:20:33 2009 +0000
+++ b/app/soc/models/group_app.py	Fri Jan 23 21:22:09 2009 +0000
@@ -89,6 +89,7 @@
     required=True,  collection_name='group_app_backup_admin',
     verbose_name=ugettext_lazy(
       'Please select your backup group administrator.'))
+  backup_admin.redirect_url = soc.models.user.User.URL_NAME
 
   member_criteria = db.TextProperty(required=True,
     verbose_name=ugettext_lazy(
--- a/app/soc/models/org_app.py	Fri Jan 23 21:20:33 2009 +0000
+++ b/app/soc/models/org_app.py	Fri Jan 23 21:22:09 2009 +0000
@@ -73,6 +73,7 @@
       'Please select your backup group administrator (if there is one).'
       ' They will be emailed to confirm, and this group will not be '
       ' accepted until they respond. (optional).'))
+  backup_admin.redirect_url = soc.models.user.User.URL_NAME
 
   contrib_template = db.ReferenceProperty(
     reference_class=soc.models.document.Document, required=False,
@@ -84,6 +85,7 @@
     'This template will be presented to contributors, such as students'
     ' and other non-member participants, when they apply to contribute'
     ' to the organization.')
+  contrib_template.redirect_url = soc.models.document.Document.URL_NAME
 
   contrib_disappears = db.TextProperty(required=True,
     verbose_text=ugettext_lazy(
--- a/app/soc/models/presence.py	Fri Jan 23 21:20:33 2009 +0000
+++ b/app/soc/models/presence.py	Fri Jan 23 21:22:09 2009 +0000
@@ -49,6 +49,7 @@
     collection_name='home')
   home.help_text = ugettext_lazy(
       'Document to be used as the "/home" page static contents.')
+  home.redirect_url = soc.models.document.Document.URL_NAME
 
   #: Valid ATOM or RSS feed url or None if unused. Feed entries are shown 
   #: on the site page using Google's JavaScript blog widget  
@@ -64,4 +65,4 @@
     collection_name='tos')
   tos.help_text = ugettext_lazy(
       'Document containing optional Terms of Service for participating.')
-
+  tos.redirect_url = soc.models.document.Document.URL_NAME
--- a/app/soc/models/user.py	Fri Jan 23 21:20:33 2009 +0000
+++ b/app/soc/models/user.py	Fri Jan 23 21:22:09 2009 +0000
@@ -61,6 +61,8 @@
      Query of the Response model 'respondent' reference.
   """
 
+  URL_NAME = 'user'
+
   #: A Google Account, which also provides a "private" email address.
   #: This email address is only used in an automated fashion by 
   #: Melange web applications and is not made visible to other users