Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Return {} if no dataset is found by name, instead of HTTP 404 (w…
…as ObjectDoesNotExist) - Return HTTP 400 Bad Request for missing request parameters when creating datasets - Return HTTP 404 Not Found on status action for missing dataset, instead of returning {} - Return HTTP 404 Not Found on metadata action, instead of raising ObjectDoesNotExist - Return HTTP 404 Not Found on coverage action, instead of returning {}
- Loading branch information
1 parent
6ecab3d
commit 49f39ac
Showing
7 changed files
with
149 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Reference | ||
========= | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
overview | ||
settings | ||
integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Pelican backend integration | ||
=========================== | ||
|
||
Pelican backend's database is treated as a read-only `legacy database <https://docs.djangoproject.com/en/3.2/howto/legacy-databases/>`__, with ``managed = False`` in all model's ``Meta`` class, and with a ``DATABASE_ROUTERS`` setting that routes queries to its database. | ||
|
||
To update ``backend/dqt/models.py`` following changes to Pelican backend's database schema: | ||
|
||
- Run ``python backend/manage.py inspectdb > backend/dqt/models.py`` | ||
- Replace comments at top of file | ||
- Replace ``models.DO_NOTHING`` with ``on_delete=models.CASCADE`` | ||
- ``Dataset``: Add methods | ||
- ``Dataset.meta``: Add ``blank=True, default=dict`` | ||
- ``DatasetFilter.dataset_id_original``: Rename to ``dataset_original``, add ``related_name="dataset_filter_parent"`` | ||
- ``DatasetFilter.dataset_id_filtered``: Rename to ``dataset_filtered``, add ``related_name="dataset_filter_child"`` | ||
- ``ProgressMonitorDataset.dataset``: Add ``related_name="progress"`` | ||
- ``ProgressMonitorItem.item``: Rename to ``data_item`` | ||
- ``Report.type``: Change ``TextField`` to ``CharField``, add ``max_length=255``, and remove ``# This field type is a guess.`` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Technical overview | ||
================== | ||
|
||
The Django project is made up of three apps: | ||
|
||
- ``dqt``: Serves API requests for the :doc:`../../frontend/index` | ||
- ``exporter``: Generates the exports to Google Docs | ||
- ``processor``: Serves API requests for managing Pelican backend |
23 changes: 1 addition & 22 deletions
23
docs/backend/reference.rst → docs/backend/reference/settings.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters