示例#1
0
 def _set_current_sheet_name_to_module_or_form_mapping(self):
     # iterate the first sheet to get unique ids for forms/modules
     all_module_and_form_details = self.current_rows[
         MODULES_AND_FORMS_SHEET_NAME]
     sheet_name_column_index = self._get_current_header_index(
         MODULES_AND_FORMS_SHEET_NAME, 'menu_or_form')
     unique_id_column_index = self._get_current_header_index(
         MODULES_AND_FORMS_SHEET_NAME, 'unique_id')
     type_column_index = self._get_current_header_index(
         MODULES_AND_FORMS_SHEET_NAME, 'Type')
     for row in all_module_and_form_details:
         self.current_sheet_name_to_module_or_form_type_and_id[
             row[sheet_name_column_index]] = Unique_ID(
                 row[type_column_index], row[unique_id_column_index])
示例#2
0
 def _set_uploaded_sheet_name_to_module_or_form_mapping(
         self, all_module_and_form_details):
     for row in all_module_and_form_details:
         self.uploaded_sheet_name_to_module_or_form_type_and_id[
             row['menu_or_form']] = Unique_ID(row['Type'], row['unique_id'])