# HG changeset patch # User Lennard de Rijk # Date 1233417794 0 # Node ID 5a9d4c2d67487ca1017107e64e41b9d9e0541d10 # Parent 0a723ff3d27cdd7ca03ffbcd19e04a5edaae535e Moved create_extra_dynafields from club_admin and member to role. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r 0a723ff3d27c -r 5a9d4c2d6748 app/soc/views/models/club_admin.py --- a/app/soc/views/models/club_admin.py Sat Jan 31 15:41:45 2009 +0000 +++ b/app/soc/views/models/club_admin.py Sat Jan 31 16:03:14 2009 +0000 @@ -25,7 +25,6 @@ from django import forms -from soc.logic import cleaning from soc.logic import dicts from soc.logic.models import club as club_logic from soc.views.helper import access @@ -74,14 +73,6 @@ new_params['extra_dynaexclude'] = ['agreed_to_tos'] - new_params['create_extra_dynafields'] = { - 'scope_path': forms.CharField(widget=forms.HiddenInput, - required=True), - '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')} - new_params['allow_invites'] = True params = dicts.merge(params, new_params) diff -r 0a723ff3d27c -r 5a9d4c2d6748 app/soc/views/models/club_member.py --- a/app/soc/views/models/club_member.py Sat Jan 31 15:41:45 2009 +0000 +++ b/app/soc/views/models/club_member.py Sat Jan 31 16:03:14 2009 +0000 @@ -24,7 +24,6 @@ from django import forms -from soc.logic import cleaning from soc.logic import dicts from soc.logic.models import club as club_logic from soc.views.helper import access @@ -76,14 +75,6 @@ new_params['extra_dynaexclude'] = ['agreed_to_tos'] - new_params['create_extra_dynafields'] = { - 'scope_path': forms.CharField(widget=forms.HiddenInput, - required=True), - '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')} - new_params['allow_requests_and_invites'] = True params = dicts.merge(params, new_params) diff -r 0a723ff3d27c -r 5a9d4c2d6748 app/soc/views/models/role.py --- 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)