Nobody has started this yet — be first.
Business impact
The whole point of a job application tracker's dashboard is "what's happening with my job search right now" -- the applications a user is actively waiting to hear back on need to be easy to find. Right now GET /api/applications/ returns the user's oldest application first and their newest one last, so for anyone with more than a page's worth of applications, the thing they care about most is buried at the bottom (or on a later page) while stale applications from months ago sit at the top forever. Users will reasonably conclude the app "isn't tracking their new application" when it's actually right there -- just at the end of the list.
Problem
Application.Meta.ordering is set to ["created_at"]. Django's ordering syntax treats a bare field name as ascending order and a "-"-prefixed field name as descending order, so ["created_at"] sorts oldest first instead of newest first.
Current behavior
GET /api/applications/ (and anything else relying on the model's default ordering) lists a user's oldest application first and their most recently created one last.
Expected behavior
GET /api/applications/ (and any other query that relies on the model's default ordering) returns applications newest-first: the application with the most recent created_at appears first in results.
Steps to reproduce
python manage.py shell -c " from django.contrib.auth import get_user_model from applications.models import Application u = get_user_model().objects.create_user(username='t2demo', password='pw-t2demo-123') Application.objects.create(user=u, company='Old Co', role='Engineer') Application.objects.create(user=u, company='New Co', role='Engineer') from rest_framework.test import APIClient c = APIClient(); c.force_authenticate(user=u) r = c.get('/api/applications/') print([row['company'] for row in r.data['results']]) "
Why this matters
Meta.ordering is the default ordering applied whenever no explicit .order_by() overrides it -- exactly what ApplicationViewSet relies on, since it never calls .order_by() itself. A one-character typo here (a missing "-") silently reverses the sort direction for every consumer of this queryset, with no error anywhere: the query is still perfectly valid SQL, it's just sorting the wrong way.
Suggested approach
Compare applications/models.py's Meta.ordering against Django's ordering syntax (a leading "-" means descending) and against what the README's API walkthrough implies about "most recent first."
Acceptance criteria
Verification
python manage.py test practicetickets.ticket02_application_list_ordering -v 2
Hints (0/2)
Try it without hints first — the reading is the exercise.
Working on this ticket
Work on a branch named for the ticket — that's what you'll submit.
Branch off your fork
$git checkout -b fix/application-list-orderingFix it and commit
Meet every acceptance criterion, and add a test that would have caught this.
Push the branch
$git push -u origin fix/application-list-orderingSubmit it below
Paste your fork URL and the branch name, with a short write-up of the root cause.
Questions
Ask about anything unclear in the ticket — the maintainer and anyone who has solved it can answer. Please don't post full solutions.
Sign in to ask a question or reply.
Sign in.envhttp://127.0.0.1:8000/api/http://127.0.0.1:8000/admin/To run against Postgres via Docker instead:
docker compose up --build # postgres + web, migrations run automatically on startup
Work the tickets in practicetickets/ (TICKET_01 through TICKET_07); each names one dedicated test, addressed by its explicit dotted label since these modules are deliberately named so Django's default test*.py discovery never picks them up:
python manage.py test practicetickets.ticket01_login_credential_swap -v 2 # a single ticket
./practicetickets/run_tickets.sh # all 7, clean pass/fail summary
Two of the seven bugs (tickets 01 and 06) are real enough to also break the project's own pre-existing suite (python manage.py test) -- fixing them correctly makes those pass again too, with zero changes needed inside accounts/tests.py or applications/tests.py.
Level 1
Fix a bug
Read existing behaviour, correct it.