|
12 | 12 | # thus should never the boolean `False`. |
13 | 13 | # When formpack cannot find a label for the requested translation, it returns the XML name instead. |
14 | 14 | UNSPECIFIED_TRANSLATION = False |
| 15 | +UNSPECIFIED_HEADER_LANG = "UNSPECIFIED_HEADER_LANG" |
15 | 16 |
|
16 | 17 | # This `UNTRANSLATED` will correspond to `null` in the schema where |
17 | 18 | # [{"label": ["X", "En", "Fr"]}] |
|
52 | 53 | # column names, values are separators. |
53 | 54 | 'hxl': '', |
54 | 55 | } |
| 56 | + |
| 57 | +GEO_QUESTION_TYPES = ('geopoint', 'geotrace', 'geoshape') |
| 58 | + |
| 59 | +# Export Settings |
| 60 | +EXPORT_SETTING_FIELDS = 'fields' |
| 61 | +EXPORT_SETTING_FIELDS_FROM_ALL_VERSIONS = 'fields_from_all_versions' |
| 62 | +EXPORT_SETTING_FLATTEN = 'flatten' |
| 63 | +EXPORT_SETTING_GROUP_SEP = 'group_sep' |
| 64 | +EXPORT_SETTING_HIERARCHY_IN_LABELS = 'hierarchy_in_labels' |
| 65 | +EXPORT_SETTING_LANG = 'lang' |
| 66 | +EXPORT_SETTING_NAME = 'name' |
| 67 | +EXPORT_SETTING_MULTIPLE_SELECT = 'multiple_select' |
| 68 | +EXPORT_SETTING_SOURCE = 'source' |
| 69 | +EXPORT_SETTING_TYPE = 'type' |
| 70 | +OPTIONAL_EXPORT_SETTINGS = [ |
| 71 | + EXPORT_SETTING_FIELDS, |
| 72 | + EXPORT_SETTING_FLATTEN, |
| 73 | + EXPORT_SETTING_NAME, |
| 74 | +] |
| 75 | +REQUIRED_EXPORT_SETTINGS = [ |
| 76 | + EXPORT_SETTING_FIELDS_FROM_ALL_VERSIONS, |
| 77 | + EXPORT_SETTING_GROUP_SEP, |
| 78 | + EXPORT_SETTING_HIERARCHY_IN_LABELS, |
| 79 | + EXPORT_SETTING_LANG, |
| 80 | + EXPORT_SETTING_MULTIPLE_SELECT, |
| 81 | + EXPORT_SETTING_TYPE, |
| 82 | +] |
| 83 | +VALID_EXPORT_SETTINGS = OPTIONAL_EXPORT_SETTINGS + REQUIRED_EXPORT_SETTINGS |
| 84 | + |
| 85 | +MULTIPLE_SELECT_BOTH = 'both' |
| 86 | +MULTIPLE_SELECT_DETAILS = 'details' |
| 87 | +MULTIPLE_SELECT_SUMMARY = 'summary' |
| 88 | +VALID_MULTIPLE_SELECTS = [ |
| 89 | + MULTIPLE_SELECT_BOTH, |
| 90 | + MULTIPLE_SELECT_DETAILS, |
| 91 | + MULTIPLE_SELECT_SUMMARY, |
| 92 | +] |
| 93 | + |
| 94 | +EXPORT_TYPE_CSV = 'csv' |
| 95 | +EXPORT_TYPE_GEOJSON = 'geojson' |
| 96 | +EXPORT_TYPE_SPSS = 'spss_labels' |
| 97 | +EXPORT_TYPE_XLS = 'xls' |
| 98 | +VALID_EXPORT_TYPES = [ |
| 99 | + EXPORT_TYPE_CSV, |
| 100 | + EXPORT_TYPE_GEOJSON, |
| 101 | + EXPORT_TYPE_SPSS, |
| 102 | + EXPORT_TYPE_XLS, |
| 103 | +] |
| 104 | + |
| 105 | +DEFAULT_LANG = '_default' |
| 106 | +DEFAULT_LANG_XML = '_xml' |
| 107 | +VALID_DEFAULT_LANGUAGES = [ |
| 108 | + DEFAULT_LANG, |
| 109 | + DEFAULT_LANG_XML, |
| 110 | +] |
| 111 | + |
| 112 | +FALSE = 'false' |
| 113 | +TRUE = 'true' |
| 114 | +VALID_BOOLEANS = [ |
| 115 | + FALSE, |
| 116 | + TRUE, |
| 117 | +] |
| 118 | + |
| 119 | +# Kobo locking constants |
| 120 | +KOBO_LOCK_ALL = 'kobo--lock_all' |
| 121 | +KOBO_LOCK_COLUMN = 'kobo--locking-profile' |
| 122 | +KOBO_LOCK_KEY = 'locked' |
| 123 | +KOBO_LOCK_SHEET = 'kobo--locking-profiles' |
| 124 | +KOBO_LOCKING_RESTRICTIONS = [ |
| 125 | + 'choice_add', |
| 126 | + 'choice_delete', |
| 127 | + 'choice_label_edit', |
| 128 | + 'choice_value_edit', |
| 129 | + 'choice_order_edit', |
| 130 | + 'question_delete', |
| 131 | + 'question_label_edit', |
| 132 | + 'question_settings_edit', |
| 133 | + 'question_skip_logic_edit', |
| 134 | + 'question_validation_edit', |
| 135 | + 'group_delete', |
| 136 | + 'group_label_edit', |
| 137 | + 'group_question_add', |
| 138 | + 'group_question_delete', |
| 139 | + 'group_question_order_edit', |
| 140 | + 'group_settings_edit', |
| 141 | + 'group_skip_logic_edit', |
| 142 | + 'group_split', |
| 143 | + 'form_replace', |
| 144 | + 'group_add', |
| 145 | + 'question_add', |
| 146 | + 'question_order_edit', |
| 147 | + 'language_edit', |
| 148 | + 'form_appearance', |
| 149 | + 'form_meta_edit', |
| 150 | +] |
0 commit comments