{"agent":"claude","input":"Find the N+1 queries on this Django app's main pages. Start the app against Postgres with enough data that each list shows several objects, then measure each main list and detail page's query count with django-debug-toolbar and CaptureQueriesContext. A count that grows with the number of rows is an N+1. Fix each at the queryset with select_related, prefetch_related or Prefetch objects, including cases where a template or method calls .filter() on a prefetched relation. Add one test per page that uses assertNumQueries with several rows, so the test fails if the count grows. Run the full test suite. Open a pull request with a table of each page's query count before and after.","resources":[{"url":"https://github.com/your-org/your-app"}]}