def get_election_summary(election, request, url=None):
    """ Returns some basic informations about the given election as a JSON
    seriazable dict. """
    last_modified = election.last_modified
    if last_modified:
        last_modified = last_modified.isoformat()
    return {'completed': election.completed, 'date': election.date.
        isoformat(), 'domain': election.domain, 'elected': election.
        elected_candidates, 'last_modified': last_modified, 'progress': {
        'counted': election.progress[0] or 0, 'total': election.progress[1] or
        0}, 'title': election.title_translations, 'type': 'election', 'url':
        url or request.link(election)}
