The goal is to make an easily-searchable database of seafood like that found in https://www.seafoodwatch.org/.
- Install Poetry if you don't have it already.
- Run
poetry install
- For all Django management commands, either prepend with
poetry run
, or runpoetry shell
and run all management commands within the poetry shell. See more about the poetry shell
Use the custom command add_ratings
, which takes a CSV file as input. For example, from the base directory:
poetry run python django_project/manage.py add_ratings test_data/ratings.csv
cd django_project
to use Django commands from within the project.
From django_project
:
poetry run python manage.py runserver
to run the local dev server.
Test python with pytest
.
Either
cd django_project
poetry run pytest
or
poetry run pytest django_project
When adding new tests, files should follow the convention test_*.py
or edit the python_files match in pyproject.toml
.