The task content is in the TASK.md
file.
python
requirements.txt
pip install -U pip
pip install -r requirements.txt
./manage.py migrate
./manage.py runserver
Install dev
requirements:
pip install -r requirements-dev.txt
Run tests:
./manage.py test
Run tests with coverage:
coverage run --source=api,photos manage.py test
coverage report
- GET: List all photos
- POST: Create a new photo
- GET: Retrieve a photo
- PUT: Update a photo
- PATCH: Partial update a photo
- DELETE: Delete a photo
- POST: Upload photos from external api
Example requests are included in requests.http file.
To show help:
./manage.py load_batch --help
Example usage:
./manage.py load_batch --url https://jsonplaceholder.typicode.com/photos
./manage.py load_batch --file /path/to/file.json