django-spreadsheets 1.7.0__tar.gz → 1.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/PKG-INFO +1 -1
  2. django_spreadsheets-1.7.2/django_spreadsheets/__init__.py +1 -0
  3. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/importer.py +2 -1
  4. django_spreadsheets-1.7.2/django_spreadsheets/locale/fr/LC_MESSAGES/django.mo +0 -0
  5. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/locale/fr/LC_MESSAGES/django.po +44 -46
  6. django_spreadsheets-1.7.2/django_spreadsheets/templates/spreadsheets/base.html +167 -0
  7. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/pyproject.toml +2 -2
  8. django_spreadsheets-1.7.0/django_spreadsheets/__init__.py +0 -1
  9. django_spreadsheets-1.7.0/django_spreadsheets/locale/fr/LC_MESSAGES/django.mo +0 -0
  10. django_spreadsheets-1.7.0/django_spreadsheets/templates/spreadsheets/base.html +0 -91
  11. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/LICENSE +0 -0
  12. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/README.md +0 -0
  13. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/admin.py +0 -0
  14. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/apps.py +0 -0
  15. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/autodiscover.py +0 -0
  16. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/base_config.py +0 -0
  17. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/conf/__init__.py +0 -0
  18. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/conf/settings.py +0 -0
  19. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/constants.py +0 -0
  20. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/errors.py +0 -0
  21. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/exceptions.py +0 -0
  22. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/exporter.py +0 -0
  23. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/forms.py +0 -0
  24. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/registry.py +0 -0
  25. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/shortcuts.py +0 -0
  26. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/templates/spreadsheets/done.html +0 -0
  27. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/templates/spreadsheets/export_index.html +0 -0
  28. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/templates/spreadsheets/import_index.html +0 -0
  29. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/templates/spreadsheets/wizard.html +0 -0
  30. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/urls.py +0 -0
  31. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/validation.py +0 -0
  32. {django_spreadsheets-1.7.0 → django_spreadsheets-1.7.2}/django_spreadsheets/views.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django_spreadsheets
3
- Version: 1.7.0
3
+ Version: 1.7.2
4
4
  Summary: Import from and export to XLSX files with data validation.
5
5
  License: BSD-3-Clause
6
6
  License-File: LICENSE
@@ -0,0 +1 @@
1
+ __version__ = "1.7.2"
@@ -507,7 +507,8 @@ class Importer:
507
507
  next(
508
508
  choice
509
509
  for choice in choices
510
- if choice.lower()
510
+ if choice
511
+ and choice.lower()
511
512
  == self.clean_string(cell.value).lower()
512
513
  )
513
514
 
@@ -8,7 +8,7 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: PACKAGE VERSION\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2024-10-07 16:46+0200\n"
11
+ "POT-Creation-Date: 2026-07-13 14:50+0200\n"
12
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
13
  "Last-Translator: Adrien DELHORME <ad@kapt.mobi>\n"
14
14
  "Language-Team: Kapt <dev@kapt.mobi>\n"
@@ -21,6 +21,9 @@ msgstr ""
21
21
  msgid "Spreadsheet"
22
22
  msgstr "Classeur"
23
23
 
24
+ msgid "This configuration is reserved for CSV export only."
25
+ msgstr "Cette configuration est réservée aux exports CSV uniquement."
26
+
24
27
  msgid "Configuration"
25
28
  msgstr "Configuration"
26
29
 
@@ -32,6 +35,10 @@ msgstr "export {config_name} {date}.xlsx"
32
35
  msgid "{config_name} template file.xlsx"
33
36
  msgstr "modèle import {config_name}.xlsx"
34
37
 
38
+ #, python-brace-format
39
+ msgid "export {config_name} {date}.csv"
40
+ msgstr "export {config_name} {date}.csv"
41
+
35
42
  msgid "Yes"
36
43
  msgstr "Oui"
37
44
 
@@ -46,6 +53,14 @@ msgstr "Feuille « {sheet_name} »"
46
53
  msgid "{message}, cell {column_letter}{row}"
47
54
  msgstr "{message}, cellule {column_letter}{row}"
48
55
 
56
+ #, python-brace-format
57
+ msgid "{message}, cell {column_letter}{row} in sheet {sheet_name}"
58
+ msgstr "{message}, cellule {column_letter}{row} dans l'onglet {sheet_name}"
59
+
60
+ #, python-brace-format
61
+ msgid "{message}, row {row} in sheet {sheet_name}"
62
+ msgstr "{message}, ligne {row} dans l'onglet {sheet_name}"
63
+
49
64
  #, python-brace-format
50
65
  msgid "The sheet \"{sheet_name}\" is missing"
51
66
  msgstr "La feuille « {sheet_name} » est manquante"
@@ -69,58 +84,69 @@ msgstr "Le nom de la colonne ne correspond pas au modèle"
69
84
  msgid "{message} : the name of column {column_letter} is \"{column_header}\" when it should be \"{expected_column_header}\""
70
85
  msgstr "{message} : le nom de la colonne {column_letter} est « {column_header} » alors qu’il devrait être « {expected_column_header} »"
71
86
 
87
+ #, python-brace-format
88
+ msgid "The type of data in column '{column_header}' ({column_letter}) is incorrect"
89
+ msgstr "Le type de donnée dans la colonne « {column_header} » ({column_letter}) est incorrect"
90
+
72
91
  #, python-brace-format
73
92
  msgid "{message}, column \"{column_header}\" ({column_letter}). {error_message}"
74
93
  msgstr "{message}, colonne « {column_header} » ({column_letter}). {error_message}"
75
94
 
76
95
  #, python-brace-format
77
- msgid "Type of data in column \"{column_header}\" ({column_letter}) is incorrect"
78
- msgstr "Le type de donnée dans la colonne « {column_header} » ({column_letter}) est incorrect"
96
+ msgid "The data in column '{column_header}' ({column_letter}) is missing"
97
+ msgstr "Absence de donnée dans la colonne « {column_header} » ({column_letter})"
79
98
 
80
99
  #, python-brace-format
81
100
  msgid "{message} : cell must no be empty"
82
101
  msgstr "{message} : la cellule ne doit pas être vide"
83
102
 
84
- #, python-brace-format
85
- msgid "Data is missing in required column \"{column_header}\" ({column_letter})"
86
- msgstr "Des données sont manquante dans la colonne « {column_header} » ({column_letter})"
87
-
88
103
  #, python-brace-format
89
104
  msgid "{message} at least one of the columns \"{column_header}\" ({column_letter}) or \"{required_unless_column_header}\" ({required_unless_column_letter}) must be completed"
90
- msgstr "{message} au moins une des colonne « {column_header} » ({column_letter}) ou « {unless_column_header} » ({required_unless_column_letter}) doit être remplie"
105
+ msgstr "{message} au moins une des colonne « {column_header} » ({column_letter}) ou « {required_unless_column_header} » ({required_unless_column_letter}) doit être remplie"
91
106
 
92
107
  #, python-brace-format
93
108
  msgid "{message} column \"{column_header}\" ({column_letter}) must be completed if column \"{required_if_column_header}\" ({required_if_column_letter}) is completed"
94
109
  msgstr "{message} la colonne « {column_header} » ({column_letter}) doit être remplie si la colonne « {required_if_column_header} » ({required_if_column_letter}) est remplie"
95
110
 
96
111
  #, python-brace-format
97
- msgid "Line {line_number} is a duplicate of line {is_duplicate_of}"
98
- msgstr "La ligne {line_number} est un doublon de la ligne {is_duplicate_of}"
112
+ msgid "Duplicate value in column '{column_header}' ({column_letter})"
113
+ msgstr "Valeur dupliquée dans la colonne « {column_header} » ({column_letter})"
114
+
115
+ #, python-brace-format
116
+ msgid "{message} : value \"{value}\" is duplicated (already on row {duplicate_of})"
117
+ msgstr "{message} : la valeur \"{value}\" est dupliquée (première occurrence ligne {duplicate_of})"
99
118
 
100
119
  msgid "Duplicated lines"
101
120
  msgstr "Lignes dupliquées"
102
121
 
103
122
  #, python-brace-format
104
- msgid "The object \"{object}\" will be deleted during import because it does not exist in the imported file."
105
- msgstr "L’objet « {object} » sera supprimé lors de l’import car il n’existe pas dans le fichier fourni."
123
+ msgid "Line {line_number} is a duplicate of line {is_duplicate_of}"
124
+ msgstr "La ligne {line_number} est un doublon de la ligne {is_duplicate_of}"
106
125
 
107
126
  msgid "Object removal"
108
127
  msgstr "Suppression d’objet"
109
128
 
129
+ #, python-brace-format
130
+ msgid "The object \"{object}\" will be deleted during import because it does not exist in the imported file."
131
+ msgstr "L’objet « {object} » sera supprimé lors de l’import car il n’existe pas dans le fichier fourni."
132
+
110
133
  msgid "unknown"
111
134
  msgstr "inconnu"
112
135
 
136
+ msgid "The configuration version of the file is incorrect"
137
+ msgstr "La version de configuration du fichier est incorrecte"
138
+
113
139
  #, python-brace-format
114
140
  msgid "The configuration version of the file ({found}) is different from that expected ({expected})"
115
141
  msgstr "La version de configuration du fichier ({found}) est différente de celui attendu ({expected})"
116
142
 
117
- msgid "The configuration version of the file is incorrect"
118
- msgstr "La version de configuration du fichier est incorrecte"
119
-
120
143
  #, python-brace-format
121
144
  msgid "`{model_name}.{field_name}` received an unknown value: \"{value}\"."
122
145
  msgstr "`{model_name}.{field_name}` a reçu une valeur inconnue: « {value} »."
123
146
 
147
+ msgid "CSVConfig only supports a single sheet."
148
+ msgstr "La configuration CSVConfig ne supporte qu'un seul onglet."
149
+
124
150
  msgid "Choose a configuration"
125
151
  msgstr "Choisissez une configuration"
126
152
 
@@ -211,6 +237,9 @@ msgstr "Étape %(step_number)s/%(steps_total)s"
211
237
  msgid "Import/Export"
212
238
  msgstr "Importer/Exporter"
213
239
 
240
+ msgid "This configuration does not support import."
241
+ msgstr "Cette configuration ne supporte pas l'import."
242
+
214
243
  #, python-brace-format
215
244
  msgid "{count} items has been imported from sheet {sheet_name}."
216
245
  msgstr "{count} éléments ont été importés depuis la feuille {sheet_name}."
@@ -219,34 +248,3 @@ msgstr "{count} éléments ont été importés depuis la feuille {sheet_name}."
219
248
  msgid "No config found with name: \"{config_name}\""
220
249
  msgstr "Aucune configuration trouvée avec le nom : « {config_name} »"
221
250
 
222
- msgid "Manual validation"
223
- msgstr "Validation manuelle"
224
-
225
- #, python-brace-format
226
- msgid "Line {row}: {message}"
227
- msgstr "Ligne {row} : {message}"
228
-
229
- #, python-brace-format
230
- msgid "Line {row}, column « {field} »: {message}"
231
- msgstr "Ligne {row}, colonne « {field} » : {message}"
232
-
233
- msgid "Manual validations OK, click ‘Next’ to import."
234
- msgstr "Validations manuelles OK, cliquez sur Suivant pour importer."
235
-
236
- #~ msgid "Column \"{column_header}\" must be of the type: {expected_type}"
237
- #~ msgstr "La colonne « {column_header} » doit être de type : {expected_type}"
238
-
239
- #~ msgid "Column \"{column_header}\" is required"
240
- #~ msgstr "La colonne « {column_header} » est requise"
241
-
242
- #~ msgid "Columns \"{column_header}\" and \"{required_if_column_header}\" must be completed"
243
- #~ msgstr "Les colonnes « {column_header} » et « {required_if_column_header} » doivent être remplies"
244
-
245
- #~ msgid "The object \"{object}\" will be deleted during import"
246
- #~ msgstr "L’objet « {object} » sera supprimé lors de l’import"
247
-
248
- #~ msgid "Problems"
249
- #~ msgstr "Problèmes"
250
-
251
- #~ msgid "warnings"
252
- #~ msgstr "avertissements"
@@ -0,0 +1,167 @@
1
+ {% extends "admin/base_site.html" %}
2
+ {% load static %}
3
+
4
+ {% block extrastyle %}
5
+ {{ block.super }}
6
+ <link rel="stylesheet" href="{% static "admin/css/forms.css" %}">
7
+ <style>
8
+ .form-row, label {
9
+ font-size: 1rem;
10
+ }
11
+ .submit-row {
12
+ margin-top: 3rem;
13
+ padding: 12px 0 12px;
14
+ }
15
+ .submit-row-item {
16
+ align-content: center;
17
+ font-family: var(--font-family-primary);
18
+ font-weight: normal;
19
+ font-size: 0.8125rem;
20
+ }
21
+ .submit-row a.button { padding: 10px 15px; }
22
+ .align-item-right {
23
+ margin-left: auto;
24
+ }
25
+ .spreadsheet-module label {
26
+ width: auto;
27
+ align-content: center;
28
+ margin-right: 1rem;
29
+ }
30
+ ul.spreadsheet-nested-errors {
31
+ --title-bg: #ba2121;
32
+ --title-fg: #fff;
33
+ --subtle-bg: #fef7f7;
34
+ --subtle-border: #e8c4c4;
35
+ }
36
+ ul.spreadsheet-nested-warnings {
37
+ --title-bg: #ffc107;
38
+ --title-fg: #000;
39
+ --subtle-bg: #fffbf0;
40
+ --subtle-border: #f0e0a8;
41
+ }
42
+ ul.spreadsheet-nested-errors,
43
+ ul.spreadsheet-nested-warnings {
44
+ margin: 0;
45
+ padding: 0;
46
+ ul { padding: 0; }
47
+ li.spreadsheet-sheet-item,
48
+ li.spreadsheet-error-item,
49
+ li.spreadsheet-warning-item {
50
+ list-style-type: none;
51
+ line-height: 1.4;
52
+ }
53
+ li.spreadsheet-sheet-item {
54
+ border: 1px solid #ddd;
55
+ margin-bottom: 8px;
56
+ }
57
+ li.spreadsheet-sheet-item:last-child {
58
+ margin-bottom: 0;
59
+ }
60
+ li.spreadsheet-sheet-item > details > ul {
61
+ margin: 0;
62
+ padding: 6px 8px 8px;
63
+ background: #fafafa;
64
+ border-top: 1px solid #e8e8e8;
65
+ }
66
+ summary {
67
+ display: block;
68
+ position: relative;
69
+ padding: 8px 12px 8px 2rem;
70
+ cursor: pointer;
71
+ font-size: 1rem;
72
+ list-style: none;
73
+
74
+ &::-webkit-details-marker {
75
+ display: none;
76
+ }
77
+ &::marker {
78
+ content: "";
79
+ }
80
+ &::before {
81
+ content: "▸";
82
+ position: absolute;
83
+ left: 0.75rem;
84
+ top: 50%;
85
+ transform: translateY(-50%);
86
+ font-size: 0.75rem;
87
+ line-height: 1;
88
+ }
89
+ }
90
+ details[open] > summary::before {
91
+ content: "▾";
92
+ }
93
+ li.spreadsheet-sheet-item > details > summary {
94
+ background: var(--title-bg);
95
+ color: var(--title-fg);
96
+ font-weight: 600;
97
+
98
+ &::before {
99
+ color: var(--title-fg);
100
+ }
101
+
102
+ .detail-link {
103
+ color: var(--title-bg);
104
+ background-color: var(--title-fg);
105
+ border-radius: 3px;
106
+ padding: 0.1rem 0.4rem;
107
+ margin-left: 1rem;
108
+ font-weight: normal;
109
+ font-size: 0.875rem;
110
+ }
111
+ }
112
+ li.spreadsheet-error-item > details > summary,
113
+ li.spreadsheet-warning-item > details > summary {
114
+ background: var(--subtle-bg);
115
+ color: #333;
116
+ border: 1px solid var(--subtle-border);
117
+ border-left: 3px solid var(--title-bg);
118
+ margin-bottom: 4px;
119
+
120
+ &::before {
121
+ color: #666;
122
+ }
123
+
124
+ .detail-link {
125
+ color: var(--title-bg);
126
+ background: transparent;
127
+ border: 1px solid var(--subtle-border);
128
+ border-radius: 3px;
129
+ padding: 0.1rem 0.4rem;
130
+ margin-left: 1rem;
131
+ font-size: 0.875rem;
132
+ }
133
+ }
134
+ .spreadsheet-error-count,
135
+ .spreadsheet-warning-count {
136
+ float: right;
137
+ font-size: 0.875rem;
138
+ font-weight: 600;
139
+ opacity: 0.85;
140
+ }
141
+ ul.spreadsheet-errors-list,
142
+ ul.spreadsheet-warnings-list {
143
+ margin: 0 0 8px 0;
144
+ padding: 4px 12px 8px 28px;
145
+ background: #fff;
146
+ border: 1px solid #e8e8e8;
147
+ border-radius: 3px;
148
+
149
+ li {
150
+ list-style-type: disc;
151
+ font-size: 1rem;
152
+ color: #444;
153
+ padding: 2px 0;
154
+ }
155
+ }
156
+ }
157
+ </style>
158
+ {% endblock extrastyle %}
159
+
160
+ {% block content %}
161
+ <div id="content-main">
162
+ <h1>
163
+ {% block page_title %}{% endblock page_title %}
164
+ </h1>
165
+ {% block main %}{% endblock main %}
166
+ </div>
167
+ {% endblock content %}
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "django_spreadsheets"
3
- version = "1.7.0"
3
+ version = "1.7.2"
4
4
  description = "Import from and export to XLSX files with data validation."
5
5
  authors = ["Kapt dev team <dev@kapt.mobi>"]
6
6
  license = "BSD-3-Clause"
@@ -27,7 +27,7 @@ pytest = "^8.3.0"
27
27
  pytest-django = "^4.9.0"
28
28
 
29
29
  [build-system]
30
- requires = ["poetry-core>=1.7.0", "setuptools"]
30
+ requires = ["poetry-core>=1.7.2", "setuptools"]
31
31
  build-backend = "poetry.core.masonry.api"
32
32
 
33
33
  [tool.isort]
@@ -1 +0,0 @@
1
- __version__ = "1.7.0"
@@ -1,91 +0,0 @@
1
- {% extends "admin/base_site.html" %}
2
- {% load static %}
3
-
4
- {% block extrastyle %}
5
- {{ block.super }}
6
- <link rel="stylesheet" href="{% static "admin/css/forms.css" %}">
7
- <style>
8
- .form-row, label {
9
- font-size: 1rem;
10
- }
11
- .submit-row {
12
- margin-top: 3rem;
13
- padding: 12px 0 12px;
14
- }
15
- .submit-row-item {
16
- align-content: center;
17
- font-family: var(--font-family-primary);
18
- font-weight: normal;
19
- font-size: 0.8125rem;
20
- }
21
- .submit-row a.button { padding: 10px 15px; }
22
- .align-item-right {
23
- margin-left: auto;
24
- }
25
- .spreadsheet-module label {
26
- width: auto;
27
- align-content: center;
28
- margin-right: 1rem;
29
- }
30
- ul.spreadsheet-nested-errors {
31
- --title-bg: #dc3545;
32
- --title-fg: #fff;
33
- }
34
- ul.spreadsheet-nested-warnings {
35
- --title-bg: #ffc107;
36
- --title-fg: #000;
37
- }
38
- ul.spreadsheet-nested-errors,
39
- ul.spreadsheet-nested-warnings {
40
- margin: 2px 0 0 0;
41
- padding: 0;
42
- ul { padding: 0; }
43
- li.spreadsheet-sheet-item,
44
- li.spreadsheet-error-item,
45
- li.spreadsheet-warning-item {
46
- list-style-type: none;
47
- line-height: initial;
48
- }
49
- li.spreadsheet-error-item,
50
- li.spreadsheet-warning-item {
51
- background-color: white;
52
- }
53
- summary {
54
- padding: 8px;
55
- cursor: pointer;
56
- background: var(--title-bg);
57
- color: var(--title-fg);
58
-
59
- .detail-link {
60
- color: var(--title-bg);
61
- background-color: var(--title-fg);
62
- border-radius: 3px;
63
- padding: .1rem .4rem;
64
- margin-left: 2rem;
65
- }
66
- }
67
- .spreadsheet-error-title,
68
- .spreadsheet-warning-title {
69
- display: flex;
70
- justify-content: space-between;
71
- }
72
- .spreadsheet-error-count,
73
- .spreadsheet-warning-count { float: right; }
74
- ul.spreadsheet-errors-list,
75
- ul.spreadsheet-warnings-list {
76
- margin-top: 8px;
77
- margin-bottom: 8px;
78
- padding: 8px 8px 1rem 8px;
79
- }
80
- }
81
- </style>
82
- {% endblock extrastyle %}
83
-
84
- {% block content %}
85
- <div id="content-main">
86
- <h1>
87
- {% block page_title %}{% endblock page_title %}
88
- </h1>
89
- {% block main %}{% endblock main %}
90
- </div>
91
- {% endblock content %}