[ZF] Dirt-simple voting app
Jim Fulton
jim at zope.com
Tue Jun 6 07:36:21 EDT 2006
Here is a sketch of my dirt-simple voting app:
There is a directory: /foundation/votes
This directory is writable only by zf committer members.
(Enforced using a group.)
There is a subdirectory for each question. When a question is
open for voting, the directory is writable.
The vote command is invoked via ssh:
ssh svn.zope.com vote issueid args
an issue has an associated "schema". This is a
Python file containing two functions, validate, and count.
The validate method validates a sequence of arguments.
The count methods prints the current results.
When someone votes, their input is validates and, if valid:
- Their vote is written to a file with the same name as their
login id
- The results of all votes (the output of count) is printed.
If the vote command is invoked with an issue id but no arguments,
then the current results are printed.
Comments/suggestions are welcome, but likely to be ignored
if following them would make significantly more work for
me. :)
I plan to start prototyping this now.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Foundation
mailing list