coalition.legislators.admin

Classes

LegislatorAdmin

Admin interface for Legislator model

Module Contents

class coalition.legislators.admin.LegislatorAdmin(model, admin_site)[source]

Bases: django.contrib.admin.ModelAdmin

Admin interface for Legislator model

list_display = ('display_name_short', 'level', 'party', 'chamber', 'state', 'district', 'in_office',...[source]
list_filter = ('level', 'chamber', 'party', 'state', 'in_office', 'is_senior')[source]
search_fields = ('first_name', 'last_name', 'bioguide_id', 'state_id', 'state')[source]
list_editable = ('in_office',)[source]
fieldsets[source]
display_name_short(obj: coalition.legislators.models.Legislator) str[source]

Short display name for list view

sponsored_bills_count(obj: coalition.legislators.models.Legislator) int[source]

Display count of sponsored bills

cosponsored_bills_count(obj: coalition.legislators.models.Legislator) int[source]

Display count of cosponsored bills

get_queryset(request: django.http.HttpRequest) QuerySet[Legislator][source]

Order by state, chamber, and then name