Style fixes in soc.views.models modules.
Patch by: Pawel Solyga
Reviewed by: to-be-reviewed
--- a/app/soc/views/models/club.py Wed Jan 28 11:23:19 2009 +0000
+++ b/app/soc/views/models/club.py Wed Jan 28 11:24:34 2009 +0000
@@ -202,7 +202,7 @@
@decorators.merge_params
@decorators.check_access
def applyMember(self, request, access_type,
- page_name=None, params=None, **kwargs):
+ page_name=None, params=None, **kwargs):
"""Shows a list of all clubs and you can choose one to apply to become a member.
Args:
--- a/app/soc/views/models/club_member.py Wed Jan 28 11:23:19 2009 +0000
+++ b/app/soc/views/models/club_member.py Wed Jan 28 11:24:34 2009 +0000
@@ -74,11 +74,11 @@
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')}
+ 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
--- a/app/soc/views/models/group.py Wed Jan 28 11:23:19 2009 +0000
+++ b/app/soc/views/models/group.py Wed Jan 28 11:24:34 2009 +0000
@@ -117,7 +117,7 @@
@decorators.merge_params
@decorators.check_access
def listRequests(self, request, access_type,
- page_name=None, params=None, **kwargs):
+ page_name=None, params=None, **kwargs):
"""Gives an overview of all the requests for a specific group.
Args:
@@ -140,7 +140,7 @@
# list all incoming requests
filter = {
- 'scope' : group_entity,
+ 'scope': group_entity,
'role': role_names,
'state': 'new'
}
@@ -158,7 +158,7 @@
# list all outstanding invites
filter = {
- 'scope' : group_entity,
+ 'scope': group_entity,
'role': role_names,
'state': 'group_accepted'
}
@@ -176,7 +176,7 @@
# list all ignored requests
filter = {
- 'scope' : group_entity,
+ 'scope': group_entity,
'role': role_names,
'state': 'ignored'
}
@@ -278,7 +278,7 @@
# set fields to match every active role this user has
fields = {'user': user,
- 'state' : 'active'}
+ 'state': 'active'}
# get the role views and start filling group_entities
role_views = self._params['role_views']
@@ -312,8 +312,8 @@
existing_roles[role_name] = role
else:
# create a description of this role
- role_description = {'roles' : {role_name: role},
- 'group' : role.scope}
+ role_description = {'roles': {role_name: role},
+ 'group': role.scope}
# add the new entry to our dictionary
role_descriptions[group_key_name] = role_description
@@ -355,7 +355,7 @@
return menus
def _getExtraMenuItems(self, role_description, params=None):
- """Used to implement group instance specific needs for the side menu
+ """Used to implement group instance specific needs for the side menu.
Args:
role_description : dict containing all the roles which is a dict of
--- a/app/soc/views/models/request.py Wed Jan 28 11:23:19 2009 +0000
+++ b/app/soc/views/models/request.py Wed Jan 28 11:24:34 2009 +0000
@@ -118,7 +118,7 @@
updated_fields = {
'link_id': forms.CharField(widget=widgets.ReadOnlyInput(),
required=True),
- 'group_id' : forms.CharField(widget=widgets.ReadOnlyInput(),
+ 'group_id': forms.CharField(widget=widgets.ReadOnlyInput(),
required=True)}
request_form = dynaform.extendDynaForm(
--- a/app/soc/views/models/user.py Wed Jan 28 11:23:19 2009 +0000
+++ b/app/soc/views/models/user.py Wed Jan 28 11:24:34 2009 +0000
@@ -76,13 +76,13 @@
'clean_link_id': cleaning.clean_user_not_exist('link_id'),
'clean_account': cleaning.clean_user_account_not_in_use('account')}
-#TODO edit_extra_dynafields => link_id read only
+ #TODO edit_extra_dynafields => link_id read only
new_params['edit_extra_dynafields'] = {
- 'link_id' : forms.CharField(widget=widgets.ReadOnlyInput(),
+ 'link_id': forms.CharField(widget=widgets.ReadOnlyInput(),
required=True),
'clean_link_id': cleaning.clean_link_id,
'clean_account': cleaning.clean_user_account('account'),
- 'clean' : cleaning.validate_user_edit('link_id', 'account'),
+ 'clean': cleaning.validate_user_edit('link_id', 'account'),
}
params = dicts.merge(params, new_params)