Welcome to tally-system’s documentation!

Tally Application:

Forms

Audit Form

Candidate Form

class tally_system.apps.tally.forms.candidate_form.CandidateForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.util.ErrorList'>, label_suffix=':', empty_permitted=False)[source]
base_fields = {'votes': <django.forms.fields.IntegerField object at 0x3d5c290>}
media

Candidate Formset

class tally_system.apps.tally.forms.candidate_formset.BaseCandidateFormSet(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.util.ErrorList'>)[source]
clean()[source]

Center Details Form

Clearance Form

Login Form

class tally_system.apps.tally.forms.login_form.LoginForm(*args, **kwargs)[source]
base_fields = {'username': <django.forms.fields.CharField object at 0x3e78190>, 'password': <django.forms.fields.CharField object at 0x3e67690>}
media

New Result Form

Pass to Quality Control Form

Password Change Form

class tally_system.apps.tally.forms.password_change.PasswordChangeForm(user, *args, **kwargs)[source]
base_fields = {'old_password': <django.forms.fields.CharField object at 0x3e97f10>, 'new_password1': <django.forms.fields.CharField object at 0x3ea0fd0>, 'new_password2': <django.forms.fields.CharField object at 0x3ea07d0>}
media
save(commit=True)[source]

Save the new password and set user_profile reset_password to false.

Reconciliation Form

Remove Center Form

Remove Station Form

Models

Archive

Audit

Ballot

Candidate

Center

Clearance

Office

Quality Control

Quarantine Check

Reconciliation Form

Result

Result Form

Station

Sub Constituency

User Profile

Views

Archive

Clearance

Corrections

Data Entry

Home

class tally_system.apps.tally.views.home.HomeView(**kwargs)[source]
dispatch(request, *args, **kwargs)[source]
get_user_role_url(user)[source]
redirect_user_to_role_view()[source]
template_name = 'home.html'
class tally_system.apps.tally.views.home.LocaleView(**kwargs)[source]
get(*args, **kwargs)[source]
tally_system.apps.tally.views.home.bad_request(request)[source]
tally_system.apps.tally.views.home.not_found(request)[source]
tally_system.apps.tally.views.home.permission_denied(request)[source]
tally_system.apps.tally.views.home.server_error(request)[source]
tally_system.apps.tally.views.home.suspicious_error(request)[source]

Intake

Profile

Quality Control

Super Admin

Reports - Offices

Reports - Races

Libraries:

Permissions

Groups

tally_system.libs.permissions.groups.add_user_to_group(user, name)[source]
tally_system.libs.permissions.groups.create_demo_users_with_groups(password='data')[source]

Create a demo user for each group.

Parameters:password – The password for the demo users.
tally_system.libs.permissions.groups.create_permission_groups()[source]
tally_system.libs.permissions.groups.user_groups(user)[source]

Middleware

Disable Clientside Caching

class tally_system.libs.middleware.disable_clientside_caching.DisableClientsideCachingMiddleware[source]
process_response(request, response)[source]

Exception Logging

Idle Timeout

class tally_system.libs.middleware.idle_timeout.IdleTimeout[source]
process_request(request)[source]

User Restrict

Models

BaseModel

class tally_system.libs.models.base_model.BaseModel(*args, **kwargs)[source]
class Meta[source]
abstract = False
BaseModel.get_next_by_created_date(*moreargs, **morekwargs)
BaseModel.get_next_by_modified_date(*moreargs, **morekwargs)
BaseModel.get_previous_by_created_date(*moreargs, **morekwargs)
BaseModel.get_previous_by_modified_date(*moreargs, **morekwargs)
BaseModel.modified_date_formatted[source]
BaseModel.reload()[source]

Dependencies

Reports

Progress

Utils

Collections

tally_system.libs.utils.collections.flatten(l)[source]
tally_system.libs.utils.collections.keys_if_value(d)[source]
tally_system.libs.utils.collections.listify(maybe_list)[source]

Make maybe list a list if it is not.

Parameters:maybe_list – A variable that may be a list.
Returns:A list.

Context Processors

tally_system.libs.utils.context_processors.debug(request)[source]
tally_system.libs.utils.context_processors.is_superadmin(request)[source]
tally_system.libs.utils.context_processors.locale(request)[source]
tally_system.libs.utils.context_processors.site_name(request)[source]

Verify

Quarantine Checks

Views

Corrections

Errors

tally_system.libs.views.errors.add_generic_error(form, message)[source]

Exports

Form State

Mixins

Pagination

tally_system.libs.views.pagination.paginate(paginator, page)[source]

Get the pages for this paginator and page.

Parameters:
  • paginator – The paginator to fetch pages from
  • page – The page to fetch.
Returns:

A list of records for this paginator and page.

tally_system.libs.views.pagination.paging(l, request)[source]

Return the appropriate page for this list and request.

Parameters:
  • l – The list of objects to paginate.
  • request – The request to retrieve a page from.
Returns:

A page for this list and request.

Session

tally_system.libs.views.session.session_matches_post_result_form(post_data, request)[source]

Verify that result for in post data matches session data.

Parameters:
  • post_date – The post data to retrieve the result form key from.
  • request – The request to retrieve the session result form key from.
Raises:

SuspiciousOperation if the session and form keys do not match.

Returns:

The result form private key.

Indices and tables