From d22f402cdc117d0e2520cfbac14b165375507db6 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Mon, 4 Dec 2017 14:30:41 +1100 Subject: [PATCH] Custom nomenclature for election, referendum, poll, etc. --- eos/base/election.py | 3 +++ eosweb/core/templates/election/base.html | 2 +- eosweb/core/templates/election/booth.html | 4 ++-- eosweb/core/templates/election/view.html | 16 ++++++++-------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/eos/base/election.py b/eos/base/election.py index d018107..2997b71 100644 --- a/eos/base/election.py +++ b/eos/base/election.py @@ -140,9 +140,12 @@ class RawResult(Result): return combined class Election(TopLevelObject): + _ver = StringField(default='0.2') + _id = UUIDField() workflow = EmbeddedObjectField(Workflow) # Once saved, we don't care what kind of workflow it is name = StringField() + kind = StringField(default='election') voters = EmbeddedObjectListField(is_hashed=False) questions = EmbeddedObjectListField() results = EmbeddedObjectListField(is_hashed=False) diff --git a/eosweb/core/templates/election/base.html b/eosweb/core/templates/election/base.html index 5b36f50..ad0db33 100644 --- a/eosweb/core/templates/election/base.html +++ b/eosweb/core/templates/election/base.html @@ -27,7 +27,7 @@ {% block content %}

{{ election.name }}

-

Election fingerprint: {{ SHA256().update_obj(election).hash_as_b64() }}

+

{{ election.kind|title }} fingerprint: {{ SHA256().update_obj(election).hash_as_b64() }}