# HG changeset patch # User Pawel Solyga # Date 1236190949 0 # Node ID ee654f3d1bba2da1af6267695d6a08f2300847b5 # Parent 17f2fd8091c3e15b50ae4151e5e2dff24abe1e03 Remove unused imports and fix too long lines and some style fixes in soc.views.models.club module. Patch by: Pawel Solyga Reviewed by: to-be-reviewed diff -r 17f2fd8091c3 -r ee654f3d1bba app/soc/views/models/club.py --- a/app/soc/views/models/club.py Wed Mar 04 18:19:00 2009 +0000 +++ b/app/soc/views/models/club.py Wed Mar 04 18:22:29 2009 +0000 @@ -24,20 +24,17 @@ from django import forms +from django.utils.translation import ugettext from soc.logic import cleaning from soc.logic import dicts -from soc.logic.models import user as user_logic from soc.logic.models import club_app as club_app_logic from soc.logic.models import club as club_logic from soc.logic.models import club_admin as club_admin_logic -from soc.logic.models import request as request_logic -from soc.views import out_of_band from soc.views.helper import access from soc.views.helper import decorators from soc.views.helper import dynaform from soc.views.helper import redirects -from soc.views.helper import responses from soc.views.helper import widgets from soc.views.models import group @@ -64,9 +61,12 @@ rights['home'] = ['allow'] rights['list'] = ['checkIsDeveloper'] rights['apply_member'] = ['checkIsUser', - ('checkGroupIsActiveForScopeAndLinkId', club_logic.logic)] - rights['list_requests'] = [('checkHasActiveRoleForLinkId', club_admin_logic.logic)] - rights['list_roles'] = [('checkHasActiveRoleForLinkId', club_admin_logic.logic)] + ('checkGroupIsActiveForScopeAndLinkId', + club_logic.logic)] + rights['list_requests'] = [('checkHasActiveRoleForLinkId', + club_admin_logic.logic)] + rights['list_roles'] = [('checkHasActiveRoleForLinkId', + club_admin_logic.logic)] rights['applicant'] = [('checkIsApplicationAccepted', club_app_logic.logic)] @@ -92,7 +92,8 @@ new_params['group_applicant_url'] = True new_params['sidebar_additional'] = [ - ('/' + new_params['url_name'] + '/apply_member', 'Join a Club', 'apply_member'),] + ('/' + new_params['url_name'] + '/apply_member', + 'Join a Club', 'apply_member'),] new_params['create_extra_dynaproperties'] = { 'clean' : cleaning.validate_new_group('link_id', 'scope_path', @@ -122,7 +123,8 @@ @decorators.check_access def applyMember(self, request, access_type, page_name=None, params=None, **kwargs): - """Shows a list of all clubs and you can choose one to apply to become a member. + """Shows a list of all clubs and you can choose one to + apply to become a member. Args: request: the standard Django HTTP request object @@ -133,8 +135,10 @@ """ list_params = params.copy() - list_params['list_action'] = (redirects.getRequestRedirectForRole, 'club_member') - list_params['list_description'] = 'Choose a club to apply to become a Club Member' + list_params['list_action'] = (redirects.getRequestRedirectForRole, + 'club_member') + list_params['list_description'] = ugettext('Choose a club to ' + 'apply to become a Club Member.') return self.list(request, access_type, page_name, params=list_params, filter=None) @@ -163,8 +167,8 @@ submenus.append(submenu) # add a link to invite a member - submenu = (redirects.getInviteRedirectForRole(group_entity, 'club_member'), - "Invite a Member", 'any_access') + submenu = (redirects.getInviteRedirectForRole(group_entity, + 'club_member'), "Invite a Member", 'any_access') submenus.append(submenu) # add a link to the request page