app/soc/views/models/role.py
changeset 1116 5a9d4c2d6748
parent 1115 0a723ff3d27c
child 1118 d2a2268b3227
--- a/app/soc/views/models/role.py	Sat Jan 31 15:41:45 2009 +0000
+++ b/app/soc/views/models/role.py	Sat Jan 31 16:03:14 2009 +0000
@@ -26,6 +26,7 @@
 from django import http
 from django.utils.translation import ugettext
 
+from soc.logic import cleaning
 from soc.logic import dicts
 from soc.logic.models import request as request_logic
 from soc.logic.models import user as user_logic
@@ -114,6 +115,15 @@
     new_params['extra_django_patterns'] = patterns
     new_params['scope_redirect'] = redirects.getInviteRedirect
 
+    new_params['create_extra_dynafields'] = {
+       'clean_link_id' : cleaning.clean_existing_user('link_id'),
+       'clean_home_page' : cleaning.clean_url('home_page'),
+       'clean_blog' : cleaning.clean_url('blog'),
+       'clean_photo_url' : cleaning.clean_url('photo_url'),
+       'scope_path': forms.CharField(widget=forms.HiddenInput,
+                                  required=True),
+       }
+
     new_params['extra_dynaexclude'] = ['user', 'status', 'agreed_to_tos_on']
 
     params = dicts.merge(params, new_params, sub_merge=True)