Minimal implementation for the Code/Work Challenge: Climate Adaptation Solutions.
Quick start (macOS, python3.11+):
- Create a virtualenv and install requirements:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Run migrations and import sample data:
python manage.py migrate
python manage.py import_solutions- Run tests:
pytest -q- Run server:
python manage.py runserverAPI endpoints:
- GET /api/solutions/ - list (supports ?category=&country=&tag=)
- GET /api/solutions/{pk}/ - retrieve
- GET /api/solutions/export_csv/ - export current filtered set as CSV
- POST /api/import-csv/ - multipart upload with 'file' field (CSV)
Data sample: /data/solutions.csv (20+ rows)