Commit Graph

74 Commits

Author SHA1 Message Date
Valentin Deniaud 40142de8d2 misc: apply double-quote-string-fixer (#79788) 2023-08-16 10:08:30 +02:00
Valentin Deniaud 989fb52719 misc: apply pyupgrade (#61865) 2022-09-29 16:22:29 +02:00
Agate 1a17d3efa6 django4: replaced *_text with *_str equivalent (#68576) 2022-08-31 11:00:37 +02:00
Thomas NOËL edde9579b5 tests: allow any order in csv files listdir (#65552) 2022-05-23 15:33:42 +02:00
Benjamin Dauvergne b16498d180 csvdatasource: do not call cache_data() on empty returned set due to model filters (#65166) 2022-05-12 12:46:09 +02:00
Valentin Deniaud 347944babf misc: remove usage of "six" module (#63682) 2022-04-20 17:01:01 +02:00
Benjamin Dauvergne 68f135e827 csvdatasource: use SQL for simple filters (#63608) 2022-04-20 15:36:51 +02:00
Lauréline Guérin 1e90f91e99
misc: fix no-name-in-module pylint error (#62099) 2022-03-25 09:03:36 +01:00
Lauréline Guérin 59182339ab
misc: fix redundant-u-string-prefix pylint error (#62099) 2022-03-25 09:03:36 +01:00
Lauréline Guérin 35512c9c2f
misc: remove unused-variable pylint error (#62099) 2022-03-25 09:03:36 +01:00
Lauréline Guérin dbb8416537
misc: add __init__ file to tests dir (#62099) 2022-03-25 08:24:24 +01:00
Nicolas Roche ec7b5c51cd csvdatasource: add upload-csv-file endpoint (#29713) 2021-07-09 10:27:03 +02:00
Nicolas Roche 06db6d8767 misc: apply isort (#52937) 2021-05-07 13:51:13 +02:00
Frédéric Péters 3d9df1e526 trivial: apply black (#49820) 2021-02-20 16:28:47 +01:00
Lauréline Guérin eeeea14a5d
django22: import django.urls (#49188) 2021-01-04 14:05:14 +01:00
Benjamin Dauvergne 982a207c65 tests: factorize user fixtures (#20851) 2020-12-14 16:21:19 +01:00
Lauréline Guérin 2d9bbb54ff
csvdatasource: clean old files (#47946) 2020-11-05 09:43:34 +01:00
Thomas NOËL 59cdda0b72 csvdatasource: force string cast before eval (#43117) 2020-06-15 12:22:17 +02:00
Thomas NOËL 3b4d90c918 csvdatasource: fix order on missing columns by using empty strings (#44044) 2020-06-13 18:32:42 +02:00
Lauréline Guérin f8f1a10967
csvdatasource: fix execute_query method when query in kwargs (#42588) 2020-05-07 15:22:16 +02:00
Benjamin Dauvergne 14a4cce0ba csvdatasource: store data in temporary file when loading excel sheets (#40704) 2020-04-23 21:11:02 +02:00
Benjamin Dauvergne d3051b50d7 csvdatasource: validate CSV file in clean() (#39971) 2020-02-18 11:40:44 +01:00
Emmanuel Cazenave ae09ae97b6 use json_loads() instead of json.loads() (#38781)
json.loads expects str in python >= 3, < 3.6.
2020-01-29 10:30:47 +01:00
Emmanuel Cazenave d96495ea43 csv: use text in python 3 (#38781)
And open file in binary mode in management command.

csv.reader expects str in python 2 and string in python 3.
2020-01-29 10:27:54 +01:00
Emmanuel Cazenave 5c6ebaaa6a tests: use resp.text (#38923) 2020-01-14 19:20:26 +01:00
Emmanuel Cazenave ee7ff828c8 get StringIO from six (#38923) 2020-01-14 19:20:26 +01:00
Frédéric Péters ed3eab6eff csv: don't evaluate csv_file_datetime on endpoint calls (#37239) 2019-10-28 10:26:24 +01:00
Frédéric Péters 9a5148d70b csv: consider DST if file ctime is ambiguous (#37236) 2019-10-28 10:26:24 +01:00
Lauréline Guérin e9c268f350
cvsdatasource: add pagination to data and query endpoints (#32121) 2019-10-04 14:40:59 +02:00
Lauréline Guérin ac776b7e4e
cvsdatasource: data is now a new-generation endpoint (#32121) 2019-10-04 14:40:51 +02:00
Frédéric Péters dc80587d5c csvdatasource: provide a ?id= filter to queries (#31491) 2019-04-02 13:31:13 +02:00
Benjamin Dauvergne 3a6c697add tests: fix null character in charfield (#30458) 2019-03-01 17:55:02 +01:00
Benjamin Dauvergne 5e23162573 csv_datasource: PEP8ness, code style (#30458) 2019-03-01 17:55:02 +01:00
Frédéric Péters d1badfefc1 csvdatasource: always select single sheet despite sheet_name value (#14058) 2019-02-07 14:39:45 +01:00
Benjamin Dauvergne a6487e94a4 csvdatasource: fix bulk_create test (#28709) 2018-12-06 17:38:31 +01:00
Benjamin Dauvergne c7086821a0 csvdatasource: use bulk_create with batching to create TableRow (#28709) 2018-12-06 15:07:36 +01:00
Serghei Mihai fbdfa332d6 csvdatasource: allow normalized search for unicode values (#26188)
Activate normalized search by default for 'q' filters.
2018-11-14 16:12:00 +01:00
Serghei Mihai 8213169a3e csvdatasource: make 'q' filter case-insensitive by default (#27984) 2018-11-14 16:12:00 +01:00
Serghei Mihai 7c15fdff03 csvdatasource: remove advanced lookup filters (#13748) 2018-11-14 16:12:00 +01:00
Frédéric Péters 3b768b8671 csv: don't detect dialects on non-csv files (#26919) 2018-10-03 12:41:50 +02:00
Benjamin Dauvergne f219ffceb9 new command to change csv_file (fixes #26582) 2018-10-01 16:53:13 +02:00
Benjamin Dauvergne 31016366f6 report failure to detect CSV dialect (fixes #26580) 2018-09-20 15:59:33 +02:00
Frédéric Péters 5460f56f92 tests: add check for caching a csv file with less rows 2018-09-12 09:18:31 +02:00
Frédéric Péters ce18d31520 csv: don't crash on files missing columns (#26248) 2018-09-08 13:53:15 +02:00
Frédéric Péters 07aafc5543 csv: keep file data in database (#11260) 2018-09-05 16:14:34 +02:00
Frédéric Péters 31c284f178 csv: add a keyed dictionary output format (#25267) 2018-08-16 13:56:53 +02:00
Frédéric Péters b5865b4809 csvdatasource: report exception details in case of expression errors (#22890) 2018-03-29 14:52:43 +02:00
Frédéric Péters 4d0f124a56 general: use full path to modules (#15689) 2017-12-20 12:17:41 +01:00
Frédéric Péters 3abd9c8fbc csvdatasource: add possibility to delete a query (#18961) 2017-12-03 13:42:56 +01:00
Thomas NOËL 3c8df18794 tests: use django-webtest instead of webtest.TestApp (#19881) 2017-11-06 15:02:51 +01:00