election_day.views.upload

Submodules

Functions

unsupported_year_error(...)

set_locale(→ None)

Sets the locale of the request by the Accept-Language header.

translate_errors(→ None)

Translates and interpolates the given error messages.

Package Contents

election_day.views.upload.unsupported_year_error(year: int) onegov.election_day.formats.imports.common.FileImportError[source]
election_day.views.upload.set_locale(request: onegov.election_day.request.ElectionDayRequest) None[source]

Sets the locale of the request by the Accept-Language header.

election_day.views.upload.translate_errors(errors: dict[str, list[Any]], request: onegov.election_day.request.ElectionDayRequest) None[source]

Translates and interpolates the given error messages.