Open lincmba opened 10 months ago
The turnout report is used for displaying the current voter turnout per administrative area. Administrative areas currently being displayed are Regions, Offices, Constituencies and Sub Constituencies on separate tabs on the Turnout Reports page. There needs to be one for the Centers. It should be consistent with the documentation provided here https://docs.google.com/spreadsheets/d/1YnykTc6-MYjokM15VRmZcSWnBS-JESA1eTEhDEivVu8/edit#gid=1805275455 https://docs.google.com/document/d/151tS0rlJpywFSrLDmr-Gtmz6PSNApv_Vbz67IsWbdX8/edit#heading=h.jzokcajibbt
turnout_reports_by_admin_areas.py
def get_centers(tally_id): return Center.objects.filter(tally_id=tally_id).annotate( area_name=F("code") ).values("area_name", "id")
get_stations_in_admin_area
get_result_forms_for_station_in_admin_area
get_station_votes_in_admin_area
get_initial_queryset
TurnoutReportByAdminAreasDataView
turnout_report_by_admin_area.html
<li role="presentation" class="{% if admin_level == 'center' %} active {% endif %}"> <a href="{% url 'turnout-list' tally_id 'center' %}">Centers</a> </li>
The turnout report is used for displaying the current voter turnout per administrative area. Administrative areas currently being displayed are Regions, Offices, Constituencies and Sub Constituencies on separate tabs on the Turnout Reports page. There needs to be one for the Centers. It should be consistent with the documentation provided here https://docs.google.com/spreadsheets/d/1YnykTc6-MYjokM15VRmZcSWnBS-JESA1eTEhDEivVu8/edit#gid=1805275455 https://docs.google.com/document/d/151tS0rlJpywFSrLDmr-Gtmz6PSNApv_Vbz67IsWbdX8/edit#heading=h.jzokcajibbt
Implementation
turnout_reports_by_admin_areas.py
fileget_stations_in_admin_area
get_result_forms_for_station_in_admin_area
get_station_votes_in_admin_area
get_initial_queryset
function in theTurnoutReportByAdminAreasDataView
viewturnout_report_by_admin_area.html
file. Update the rest of the file accordingly to have the changeTask check list