Hi Tomasz,
I was able to build the admin page and put a search box there:
class LawyerAdmin(admin.ModelAdmin):
fieldsets = [
('Name', {'fields': ['last', 'first', 'initial']}),
('School', {'fields': ['school', 'year_graduated']}),
]
list_display = ('first', 'initial', 'last', 'school',
'year_graduated')
list_filter = ['year_graduated']
search_fields = ['last', 'first']
This search box searches only first and last names. But what i want is
a search box that finds all lawyers who went to same school. My
database now contains:
Tom T. Lawyer3 Columbia School of Law 2003
Bob Lawyer2 NYU 2000
John I Lawyer1 NYU 2000
So Lawyer1 and Lawyer2 graduated from NYU in 2000.
So I want to enter in the search box "Lawyer1" and in the result page
I want to see "Lawyer1 knows Lawyer2"
How do I do this?
Thank you so much.