# HG changeset patch # User Lennard de Rijk # Date 1246726417 -7200 # Node ID 1e44d71c0e3ecb35b6f00e3b8bd653578d9997ce # Parent dd0322a37e447a88b61bc7316c2151e947272a70 Several style fixes due to code reviews. diff -r dd0322a37e44 -r 1e44d71c0e3e app/soc/views/helper/redirects.py --- a/app/soc/views/helper/redirects.py Sat Jul 04 17:23:19 2009 +0200 +++ b/app/soc/views/helper/redirects.py Sat Jul 04 18:53:37 2009 +0200 @@ -372,9 +372,9 @@ survey_entity = info['survey'] params = info['params'] - return '/%s/take/%s?project=%s' %(params['url_name'], - survey_entity.key().id_or_name(), - entity.key().id_or_name()) + return '/%s/take/%s?project=%s' % (params['url_name'], + survey_entity.key().id_or_name(), + entity.key().id_or_name()) def getToSRedirect(presence): diff -r dd0322a37e44 -r 1e44d71c0e3e app/soc/views/models/program.py --- a/app/soc/views/models/program.py Sat Jul 04 17:23:19 2009 +0200 +++ b/app/soc/views/models/program.py Sat Jul 04 18:53:37 2009 +0200 @@ -673,27 +673,27 @@ "List Documents", 'any_access')] # add link to create a new Program Survey items += [(redirects.getCreateSurveyRedirect(entity, 'program', - 'survey'), + 'survey'), "Create a New Survey", 'any_access')] # add link to list all Program Surveys items += [(redirects.getListSurveysRedirect(entity, 'program', - 'survey'), + 'survey'), "List Surveys", 'any_access')] # add link to create a new Project Survey items += [(redirects.getCreateSurveyRedirect(entity, 'program', - 'project_survey'), + 'project_survey'), "Create a New Project Survey", 'any_access')] # add link to list all Project Surveys items += [(redirects.getListSurveysRedirect(entity, 'program', - 'project_survey'), + 'project_survey'), "List Project Surveys", 'any_access')] # add link to create a new Grading Survey items += [(redirects.getCreateSurveyRedirect(entity, 'program', - 'grading_project_survey'), + 'grading_project_survey'), "Create a New Grading Survey", 'any_access')] # add link to list all Grading Surveys items += [(redirects.getListSurveysRedirect(entity, 'program', - 'grading_project_survey'), + 'grading_project_survey'), "List Grading Surveys", 'any_access')] except out_of_band.Error: diff -r dd0322a37e44 -r 1e44d71c0e3e app/soc/views/models/survey.py --- a/app/soc/views/models/survey.py Sat Jul 04 17:23:19 2009 +0200 +++ b/app/soc/views/models/survey.py Sat Jul 04 18:53:37 2009 +0200 @@ -623,7 +623,8 @@ self._takePost(request, params, entity, record, properties) # update the record entity if any and clear all dynamic properties - record_logic.updateOrCreateFromFields(record, properties, clear_dynamic=True) + record_logic.updateOrCreateFromFields(record, properties, + clear_dynamic=True) # TODO: add notice to page that the response has been saved successfully # redirect to the same page for now