swcarpentry/amy — pull request #86 by gvwilson (2014-12-18 17:16:27+00:00)
Title: Annotating instructor search results with count of times taught.

1. Add column to template.

2. Add field to form asking how many results to display.

3. Add annotation to person objects in view.

FIXME: there's a bug in here somewhere.

1. Search for 50 instructors at latitude 43 and longitude -79 (i.e., Toronto, which has airport_id 108).

2. Person 7069 shows up as having taught 3 times.

3. But a raw query on the database:

~~~
select count(*) from workshops_task where person_id=7069;
~~~

shows 46 hits.

FIXME: should use aggregation with `Count` to count number of times people have taught.