This repository contains a small Django project used to manage exam results.
Your task is to complete the project so that it exposes a simple API endpoint returning the students who passed an exam.
If something is unclear or incomplete, feel free to make reasonable assumptions and document them briefly.
We are also interested in how you handle ambiguity and technical trade-offs.
Please create a private copy of this repository and work on your solution there.
Once completed, please share access to your private repository directly with us. Do not open a public Pull Request against this repository.
About 1–2 hours.
Please do not spend more than approximately 3 hours on this exercise.
The goal is not to build something perfect or production-ready, but to show how you work:
- your reasoning,
- code clarity,
- pragmatic decisions,
- and ability to communicate assumptions and trade-offs.
Clean and maintainable code is preferred over unnecessary complexity.
You may use AI tools (ChatGPT, Copilot, Claude, etc.) if you wish.
However, you should fully understand and be able to explain any code you submit.
The repository already contains sample data (about 200 records) to help you test your endpoint.
Install dependencies:
pip install -r requirements.txtRun migrations:
python manage.py migrateLoad sample data:
python manage.py loaddata data/sample_data.jsonRun the server:
python manage.py runserverThe API will be available at:
http://localhost:8000/api/results/passed/
The repository contains a basic Docker configuration that may require small adjustments to run the project correctly.
Your goal is to make the project start with:
docker compose up --buildOnce the container is running, you may need to run:
docker compose exec web python manage.py migrate
docker compose exec web python manage.py loaddata data/sample_data.jsonThe API should then be available at:
http://localhost:8000/api/results/passed/
Complete the following endpoint:
GET /api/results/passed/It should return all results with a score greater than or equal to 10, sorted by descending score.
Example response:
[
{"student_name": "Alice", "course": "Mathematics", "score": 14.5},
{"student_name": "Chloé", "course": "Physics", "score": 12.0}
]The endpoint should also support:
GET /api/results/passed/?min_score=12You may use Django's test framework.
The provided Docker configuration is intentionally minimal.
Make the project start correctly using:
docker compose up --buildPlease follow these steps:
- Create a private copy of this repository
- Complete the exercise in your private repository
- Share access to the repository directly with us once finished
Please do not open a public Pull Request against this repository.
Small and meaningful commits are appreciated.
You may include a short README section explaining:
- your assumptions,
- trade-offs,
- and possible improvements.
If you had more time, what would you improve in this project?
A short paragraph or bullet list is enough.
- Keep things simple.
- Clean and readable code is preferred over unnecessary complexity.
- If something is incomplete, explain what you would do next.
- Please keep your solution private to avoid exposing it to other candidates.
If you have time, add:
- input validation for
min_score - a small README section explaining your choices
- an improvement proposal