Commit graph

14 commits

Author SHA1 Message Date
Jennifer Richards b65a37b6e8
feat: POST for document search requests (#8206)
* refactor: doc search via POST (WIP)

Changes the search view to use a POST instead of a GET. Refactors cache key computation to use cleaned data.

Still todo:
 * refactor frontpage view to match
 * refactor menubar search (?)
 * refactor stats view that uses SearchForm
 * revive or drop the "backwards compatibility" branch

* feat: convert GET search to POST

Still todo:
 * refactor frontpage view to match
 * refactor menubar search (?)
 * refactor stats view that uses SearchForm

* fix: revert frontpage changes, search works

Still todo:
 * refactor stats view that uses SearchForm

* fix: define vars in all branches

* refactor: update stats use of SearchForm

* chore: improve message

* fix: remove lint

* chore: comments re: QuerySetAny

* test: test query string search params

* style: Black

* test: refactor test_search()

* test: refactor test_search_became_rfc()

* test: use scroll_and_click helper
2024-11-14 16:05:38 -06:00
Jennifer Richards 68eb685382
test: Use django_stubs_ext.QuerySetAny for isinstance() checks
mypy complains if QuerySet is used because it uses a parameterized
generic type.
2023-05-13 10:05:33 -03:00
Jennifer Richards da168395fc
refactor: Replace deprecated smart_text with smart_str 2023-05-09 15:23:33 -03:00
Jennifer Richards 07e26dd52e
refactor: Replace deprecated force_text with force_str 2023-05-09 15:21:50 -03:00
Robert Sparks b988850985
fix: avoid mutables as defaults. Compute date default arguments at runtime rather than loadtime. (#4144) 2022-07-06 14:39:36 -05:00
Henrik Levkowetz 0db30f3ca8 Updated the API v2 JsonExporMixin to not try to use an API key argument as a queryset argument when building the json response.
- Legacy-Id: 17631
2020-04-15 12:01:52 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz e9a37d8ac8 Removed six.text_type(), changed six.moves.urllib to plain urllib, and removed now unused six imports.
- Legacy-Id: 17385
2020-03-05 14:41:41 +00:00
Henrik Levkowetz bdc73e771a Python2/3 compatibility: replaced six.ensure_text() with either six.text_type or django's force_text(), depending on the case, and fixed a variable scope issue.
- Legacy-Id: 16461
2019-07-16 13:20:05 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz 92350834c7 Give hashlib.md5() bytes instead of str.
- Legacy-Id: 16325
2019-06-28 20:20:18 +00:00
Henrik Levkowetz e39ac52071 Removed 2to3-generated list() around .items() iterator in for loops.
- Legacy-Id: 16315
2019-06-27 18:11:17 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz a62e9964a5 Added a recursive object to JSON serializer and a view which will let any logged-in user download a JSON serialized copy of the datatracker information related to his person record. Added information about this, and a link, to the account page. Related to issue #2501.
- Legacy-Id: 15206
2018-06-04 13:06:47 +00:00