Formatting and whitespace changes in README to make it more markdown-y.
This commit is contained in:
parent
a4a320a6b6
commit
a20b46f973
1 changed files with 39 additions and 40 deletions
15
README
15
README
|
@ -1,4 +1,4 @@
|
||||||
Setting up an election:
|
# Setting up an election
|
||||||
|
|
||||||
0. vote/include/election-sql.php expects a secret config file that exists
|
0. vote/include/election-sql.php expects a secret config file that exists
|
||||||
only on the server and is included as PHP code. It's hard coded currently
|
only on the server and is included as PHP code. It's hard coded currently
|
||||||
|
@ -34,7 +34,10 @@ Setting up an election:
|
||||||
|
|
||||||
GRANT SELECT on somedb.elections TO someuser@localhost;
|
GRANT SELECT on somedb.elections TO someuser@localhost;
|
||||||
GRANT SELECT on somedb.election_choices TO someuser@localhost;
|
GRANT SELECT on somedb.election_choices TO someuser@localhost;
|
||||||
|
GRANT SELECT,DELETE on somedb.election_tmp_tokens TO someuser@localhost;
|
||||||
|
GRANT SELECT on somedb.election_voters TO someuser@localhost;
|
||||||
|
GRANT SELECT,INSERT on somedb.election_anon_tokens TO someuser@localhost;
|
||||||
|
GRANT INSERT on somedb.election_votes TO someuser@localhost;
|
||||||
|
|
||||||
2. Create an election, with something like this:
|
2. Create an election, with something like this:
|
||||||
mysql -u root -D somedb -p
|
mysql -u root -D somedb -p
|
||||||
|
@ -42,14 +45,12 @@ Setting up an election:
|
||||||
SET NAMES 'utf8';
|
SET NAMES 'utf8';
|
||||||
INSERT t INTO elections (type, name, voting_start, voting_end, choices_nb, question) VALUES ("elections", "2011 Spring Election", "2011-05-29 00:00:00", "2011-06-12 23:59:59", "7", "Which candidates would you like to see Elected?");
|
INSERT t INTO elections (type, name, voting_start, voting_end, choices_nb, question) VALUES ("elections", "2011 Spring Election", "2011-05-29 00:00:00", "2011-06-12 23:59:59", "7", "Which candidates would you like to see Elected?");
|
||||||
set @el_id = @@IDENTITY;
|
set @el_id = @@IDENTITY;
|
||||||
INSERT INTO election_choices (election_id, choice)
|
INSERT INTO election_choices (election_id, choice) VALUES
|
||||||
VALUES
|
|
||||||
(@el_id, 'Candidate 1'),
|
(@el_id, 'Candidate 1'),
|
||||||
(@el_id, 'Candidate 2'),
|
(@el_id, 'Candidate 2'),
|
||||||
(@el_id, 'Candidate 3'),
|
(@el_id, 'Candidate 3'),
|
||||||
(@el_id, 'Candidate 4');
|
(@el_id, 'Candidate 4');
|
||||||
INSERT INTO election_voters (election_id, email_address)
|
INSERT INTO election_voters (election_id, email_address) VALUES
|
||||||
VALUES
|
|
||||||
(@el_id, 'voter1@example.org'),
|
(@el_id, 'voter1@example.org'),
|
||||||
(@el_id, 'voter2@example.org'),
|
(@el_id, 'voter2@example.org'),
|
||||||
(@el_id, 'voter3@example.com'),
|
(@el_id, 'voter3@example.com'),
|
||||||
|
@ -63,7 +64,5 @@ INSERT INTO election_voters (election_id, email_address)
|
||||||
|
|
||||||
That number you see at the end is this election's id. The URL you'll give out
|
That number you see at the end is this election's id. The URL you'll give out
|
||||||
is thus something like:
|
is thus something like:
|
||||||
|
|
||||||
http://example.org/vote?election_id=THAT_NUMBER
|
http://example.org/vote?election_id=THAT_NUMBER
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue