views.py

About this file

The search routes handled are for:
To Search requests by different filters like title, agency request summary, etc;
Convert and send the a search result-set as a file of the specified document type.

Code Check Report


app/search/views.py:15:1: F401 'app.search.constants.ALL_RESULTS_CHUNKSIZE' imported but unused
                        

Documentation drawn from source code


requests():

For request parameters, see app.search.utils.search_requests

All Users can search by:
- FOIL ID

Anonymous Users can search by:
- Title (public only)
- Agency Request Summary (public only)

Public Users can search by:
- Title (public only OR public and private if user is requester)
- Agency Request Summary (public only)
- Description (if user is requester)

Agency Users can search by:
- Title
- Agency Request Summary
- Description
- Requester Name

All Users can filter by:
- Status, Open (anything not Closed if not agency user)
- Status, Closed
- Date Submitted
- Agency

Only Agency Users can filter by:
- Status, In Progress
- Status, Due Soon
- Status, Overdue
- Date Due


requests_doc(doc_type):

Converts and sends the a search result-set as a
file of the specified document type.
- Filtering on set size is ignored; all results are returned.
- Currently only supports CSVs.
- CSV only includes requests belonging to that user's agency

Document name format: "FOIL_requests_results_

Request parameters are identical to those of /search/requests.

:param doc_type: document type ('csv' only)

Source code