[Fedora Elections] #36: Consider hiding historical elections
by fedora-badges
#36: Consider hiding historical elections
---------------------+------------------------------------------------------
Reporter: tremble | Owner: nigelj
Type: defect | Status: new
Priority: minor | Milestone: Future Release
Component: General | Version: 0.2.1
Keywords: |
---------------------+------------------------------------------------------
The list of elections is growing.
While we want to keep the information (probably), do we really want to
display more than the last X (15? - just over two releases, would show how
a current board member was elected) months worth of election, and just
tuck the rest behind a "historical eletcions" link
--
Ticket URL: <https://fedorahosted.org/elections/ticket/36>
Fedora Elections <https://fedorahosted.org/elections/>
Fedora Elections
10 years, 1 month
[Fedora Elections] #26: First submit should be preview
by fedora-badges
#26: First submit should be preview
-------------------------+--------------------------------------------------
Reporter: mmcgrath | Owner: nigelj
Type: enhancement | Status: new
Priority: major | Milestone:
Component: General | Version: 0.1.5
Keywords: |
-------------------------+--------------------------------------------------
Minor thing but I think it might help, when you vote. The first screen to
submit to should really say "preview" instead of submit since you're not
submitting the vote until the final screen.
--
Ticket URL: <https://fedorahosted.org/elections/ticket/26>
Fedora Elections <https://fedorahosted.org/elections/>
Fedora Elections
11 years, 11 months
[Fedora Elections] #28: Improvements for the Voting App: Allow voting multiple times
by fedora-badges
#28: Improvements for the Voting App: Allow voting multiple times
-------------------------+--------------------------------------------------
Reporter: ixs | Owner: nigelj
Type: enhancement | Status: new
Priority: major | Milestone:
Component: General | Version: 0.1.5
Keywords: |
-------------------------+--------------------------------------------------
Please allow voting multiple times with each later vote canceling the
previous votes. This easily allows to correct a mistake during the voting
procedure or accounts for changed opinion.
There has just been a bit of discussion on IRC where people accidentially
voted incorrectly and would have liked such a feature.
kthxbai
--
Ticket URL: <https://fedorahosted.org/elections/ticket/28>
Fedora Elections <https://fedorahosted.org/elections/>
Fedora Elections
11 years, 11 months
2 commits - elections2/controllers elections2/lib elections2/model elections2/templates
by Pierre-YvesChibon
elections2/controllers/root.py | 27 +++++++++++++++++++++------
elections2/lib/vote.py | 11 ++++++-----
elections2/model/__init__.py | 38 ++------------------------------------
elections2/templates/results.html | 13 ++++++++++++-
elections2/templates/verify.html | 12 ++++++++++--
5 files changed, 51 insertions(+), 50 deletions(-)
New commits:
commit 7b6678f82d54a083ef6e8c03c79785cb22c5db5d
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Wed Dec 14 13:47:33 2011 +0100
Code layout in the template
diff --git a/elections2/templates/verify.html b/elections2/templates/verify.html
index 0dbea59..c5b0d59 100644
--- a/elections2/templates/verify.html
+++ b/elections2/templates/verify.html
@@ -11,11 +11,19 @@
<p>Please check the below content to ensure that all of your cast votes are marked as 'valid', if you notice any elections showing that you have an invalid vote cast please contact the election administration team by creating a ticket at the <a href="https://fedorahosted.org/fedora-infrastructure/">Fedora Infrastructure ticket system</a> and select the 'Elections' component with your FAS username and the election that is marked as invalid.</p>
<h2 py:if="validvotes">Valid Votes</h2>
<ul py:if="validvotes">
- <li py:for="vote in validvotes"><a href="${tg.url('/about/' + validvotes[vote].election.id)}">${validvotes[vote].election.shortdesc}</a></li>
+ <li py:for="vote in validvotes">
+ <a href="${tg.url('/about/' + validvotes[vote].election.id)}">
+ ${validvotes[vote].election.shortdesc}
+ </a>
+ </li>
</ul>
<h2 py:if="invalidvotes">Invalid Votes</h2>
<ul py:if="invalidvotes">
- <li py:for="vote in invalidvotes"><a href="${tg.url('/about/' + invalidvotes[vote].election.id)}">${invalidvotes[vote].election.shortdesc}</a></li>
+ <li py:for="vote in invalidvotes">
+ <a href="${tg.url('/about/' + invalidvotes[vote].election.id)}">
+ ${invalidvotes[vote].election.shortdesc}
+ </a>
+ </li>
</ul>
</body>
commit dabbcf6f0adae3bf4bd4cf5c1cf606c2a88d1a4e
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Wed Dec 14 13:47:26 2011 +0100
Start removing View from the application.
Remove View fvotecount obj: VoteTally
Remove View uservotes obj: UserVoteCount
Adjust queries
Adjust results template to the new query
diff --git a/elections2/controllers/root.py b/elections2/controllers/root.py
index 430d6b7..ca672a3 100644
--- a/elections2/controllers/root.py
+++ b/elections2/controllers/root.py
@@ -23,6 +23,7 @@ from elections2.lib.vote import Vote
from datetime import datetime
+from sqlalchemy import func
__all__ = ['RootController']
@@ -138,8 +139,11 @@ class RootController(BaseController):
validvotes = {}
invalidvotes = {}
c = 0
- allvotes = UserVoteCount.query.filter_by(voter=
- turbogears.identity.current.user_name).all()
+ print request.identity['user']
+ allvotes = model.DBSession.query(Votes.election_id,
+ Votes.voter, func.count(Votes.voter)
+ ).filter_by(voter=request.identity['user']
+ ).group_by(Votes.voter).all()
for v in allvotes:
if len(v.election.candidates) == v.novotes:
validvotes[c] = v
@@ -188,10 +192,12 @@ class RootController(BaseController):
def results(self, eid=None):
try:
eid = int(eid)
- election = model.DBSession.query(Elections).filter_by(id=eid).all()[0]
+ election = model.DBSession.query(Elections).filter_by(
+ id=eid).all()[0]
except ValueError:
try:
- election = model.DBSession.query(Elections).filter_by(alias=eid).all()[0]
+ election = model.DBSession.query(Elections).filter_by(
+ alias=eid).all()[0]
eid = election.id
except IndexError:
flash("This election does not exist, check"\
@@ -238,8 +244,17 @@ class RootController(BaseController):
" are currently embargoed pending formal"
" announcement.")
raise turbogears.redirect("/")
- votecount = model.DBSession.query(VoteTally).filter_by(election_id=eid
- ).order_by(VoteTally.novotes.desc()).all()
+ votecount = model.DBSession.query(Candidates,
+ func.sum(Votes.weight).label('novotes'
+ )).filter(
+ Candidates.id == Votes.candidate_id
+ ).filter_by(
+ election_id=eid,
+ ).order_by(
+ func.sum(Votes.weight).desc()
+ ).all()
+
+
return dict(votecount=votecount, usernamemap=usernamemap,
election=election, appTitle=self.appTitle)
diff --git a/elections2/lib/vote.py b/elections2/lib/vote.py
index e5c3547..81e8ccf 100644
--- a/elections2/lib/vote.py
+++ b/elections2/lib/vote.py
@@ -34,9 +34,10 @@ from elections2.lib.base import BaseController
from elections2 import model
from elections2.model import Elections, LegalVoters, Candidates, \
- Votes, UserVoteCount
+ Votes
import sqlalchemy
+from sqlalchemy import func
#from turbogears.database import session
@@ -87,7 +88,7 @@ class Vote(BaseController):
usergroups if re.match("cla_.*",g)])
):
match = 1
- elif request.identity.in_group(group.group_name) or \
+ elif predicates.in_group(group.group_name) or \
group.group_name == "anyany":
match = 1
if match == 0:
@@ -99,9 +100,9 @@ class Vote(BaseController):
candidates = model.DBSession.query(Candidates
).filter_by(election_id=eid
).order_by(Candidates.name).all()
- uservote = model.DBSession.query(UserVoteCount
- ).filter_by(election_id=eid,
- voter=request.identity['username']).all()
+ uservote = model.DBSession.query(Votes.election_id,
+ Votes.voter, func.count(Votes.voter)
+ ).group_by(Votes.voter).all()
usernamemap = {}
diff --git a/elections2/model/__init__.py b/elections2/model/__init__.py
index c9dce69..8c7e2db 100644
--- a/elections2/model/__init__.py
+++ b/elections2/model/__init__.py
@@ -101,40 +101,6 @@ class ElectionAdmins(DeclarativeBase):
return self.group_name
#}
-class VoteTally(DeclarativeBase):
- __tablename__ = 'fvotecount'
-
- #{ Columns
- id = Column(Integer, ForeignKey('candidates.id'), primary_key=True)
- name = Column(String, nullable=False)
- novotes = Column(Integer, nullable=False)
-
- #{ Special methods
- def __repr__(self):
- return '<VoteTally: id=%r election=%r group=%r>' % ( self.id,
- self.election_id, self.group_name)
-
- def __unicode__(self):
- return self.group_name
- #}
-
-class UserVoteCount(DeclarativeBase):
-
- __tablename__ = 'uservotes'
-
- #{ Columns
- election_id = Column(Integer, ForeignKey('elections.id'), primary_key=True)
- voter = Column(String, nullable=False, primary_key=True)
- novotes = Column(Integer, nullable=False)
-
- #{ Special methods
- def __repr__(self):
- return '<UserVoteCount: id=%r voter=%r novotes=%r>' % (
- self.election_id, self.voter, self.novotes)
-
- def __unicode__(self):
- return self.group_name
- #}
class Elections(DeclarativeBase):
"""
@@ -160,7 +126,7 @@ class Elections(DeclarativeBase):
#{ Relations
legalVoters = relation('LegalVoters')
candidates = relation('Candidates')
- uservotes = relation('UserVoteCount')
+ #uservotes = relation('UserVoteCount')
#{ Special methods
def __repr__(self):
@@ -211,7 +177,7 @@ class Candidates(DeclarativeBase):
status = Column(Integer)
#{ Relations
- #votes = relation('Votes', backref='candidate'),
+ votes = relation('Votes', backref='candidate'),
#tally = relation('VoteTally', backref='candidate')
#{ Special methods
diff --git a/elections2/templates/results.html b/elections2/templates/results.html
index d2d142d..7570a55 100644
--- a/elections2/templates/results.html
+++ b/elections2/templates/results.html
@@ -12,7 +12,18 @@
<p py:if="election.url"><a href="${election.url}">[More Information]</a></p>
<table border="1" cellpadding="1">
<tr py:for="candcount in votecount">
- <td><py:choose test="election.usefas"><py:when test="0">${candcount.candidate.name}</py:when><py:when test="1">${usernamemap[candcount.candidate.id]}</py:when></py:choose> <small py:if="candcount.candidate.url"><a href="${candcount.candidate.url}">[info]</a></small></td>
+ <td><py:choose test="election.usefas">
+ <py:when test="0">
+ ${candcount.Candidates.name}
+ </py:when>
+ <py:when test="1">
+ ${usernamemap[candcount.Candidates.id]}
+ </py:when>
+ </py:choose>
+ <small py:if="candcount.Candidates.url">
+ <a href="${candcount.Candidates.url}">[info]</a>
+ </small>
+ </td>
<td>${candcount.novotes}</td>
</tr>
</table>
12 years, 5 months
3 commits - elections2/controllers elections2/lib elections2/model
by Pierre-YvesChibon
elections2/controllers/root.py | 5
elections2/lib/admin.py | 21 ++-
elections2/model/__init__.py | 222 +++++++++++++++++++++++++++++------------
3 files changed, 173 insertions(+), 75 deletions(-)
New commits:
commit 9cee6a800b052fa48ce3ad20b573b9fcc6040e50
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sun Dec 4 21:52:38 2011 +0100
Start porting the model to SA
diff --git a/elections2/model/__init__.py b/elections2/model/__init__.py
index c6df12a..c9dce69 100644
--- a/elections2/model/__init__.py
+++ b/elections2/model/__init__.py
@@ -8,8 +8,6 @@ from sqlalchemy.types import Unicode, Integer, DateTime, String
#from sqlalchemy import MetaData
from sqlalchemy.ext.declarative import declarative_base
-from fedora.tg.json import SABase
-
# Global session manager: DBSession() returns the Thread-local
# session object appropriate for the current web request.
maker = sessionmaker(autoflush=True, autocommit=False,
@@ -53,48 +51,8 @@ def init_model(engine):
# use the model outside tg2, you need to make sure this is called before
# you use the model.
- #
- # See the following example:
-
- #global t_reflected
-
- #t_reflected = Table("Reflected", metadata,
- # autoload=True, autoload_with=engine)
- ElectionsTable = Table('elections', metadata, autoload=True)
- VotesTable = Table('votes', metadata, autoload=True)
- CandidatesTable = Table('candidates', metadata, autoload=True)
- LegalVotersTable = Table('legalvoters', metadata, autoload=True)
- ElectionAdminsTable = Table('electionadmins', metadata, autoload=True)
-
# View in the DB. Needs to have the column keys defined
- VoteTallyTable = Table('fvotecount', metadata,
- Column('id', Integer,
- ForeignKey('candidates.id'), primary_key=True),
- Column('election_id', Integer),
- Column('name', String, nullable=False),
- Column('novotes', Integer, nullable=False)
- )
- UserVoteCountTable = Table('uservotes', metadata,
- Column('election_id', Integer, ForeignKey('elections.id'), primary_key=True),
- Column('voter', String, nullable=False, primary_key=True),
- Column('novotes', Integer, nullable=False)
- )
-
- #mapper(Reflected, t_reflected)
- mapper(Elections, ElectionsTable, properties = {
- 'legalVoters': relation(LegalVoters, backref='election'),
- 'candidates': relation(Candidates, backref='election'),
- 'uservotes': relation(UserVoteCount, backref='election')
- })
- mapper(Votes, VotesTable)
- mapper(Candidates, CandidatesTable, properties = {
- 'votes': relation(Votes, backref='candidate'),
- 'tally': relation(VoteTally, backref='candidate')
- })
- mapper(LegalVoters, LegalVotersTable)
- mapper(ElectionAdmins, ElectionAdminsTable)
- mapper(VoteTally, VoteTallyTable)
- mapper(UserVoteCount, UserVoteCountTable)
+
# Import your model modules here.
from elections2.model.auth import User, Group, Permission
@@ -103,23 +61,163 @@ from elections2.model.auth import User, Group, Permission
# Classes to map to
#
-class Elections(SABase):
- pass
-
-class Votes(SABase):
- pass
-
-class Candidates(SABase):
- pass
-
-class LegalVoters(SABase):
- pass
-
-class ElectionAdmins(SABase):
- pass
-
-class VoteTally(SABase):
- pass
-class UserVoteCount(SABase):
- pass
+class LegalVoters(DeclarativeBase):
+ """
+ Define the voters.
+ """
+ __tablename__ = 'legalvoters'
+
+ #{ Columns
+ id = Column(Integer, autoincrement=True, primary_key=True, unique=True)
+ election_id = Column(Integer, ForeignKey('elections.id'), nullable=False)
+ group_name = Column(Unicode(150), nullable=False)
+
+ #{ Special methods
+ def __repr__(self):
+ return '<LegalVoters: group=%r>' % self.group_name
+
+ def __unicode__(self):
+ return self.group_name
+ #}
+
+
+class ElectionAdmins(DeclarativeBase):
+ """
+ Define the Admins.
+ """
+ __tablename__ = 'electionadmins'
+
+ #{ Columns
+ id = Column(Integer, autoincrement=True, primary_key=True, unique=True)
+ election_id = Column(Integer, ForeignKey('elections.id'), nullable=False)
+ group_name = Column(Unicode(150), nullable=False)
+
+ #{ Special methods
+ def __repr__(self):
+ return '<ElectionAdmins: group=%r>' % self.group_name
+
+ def __unicode__(self):
+ return self.group_name
+ #}
+
+class VoteTally(DeclarativeBase):
+ __tablename__ = 'fvotecount'
+
+ #{ Columns
+ id = Column(Integer, ForeignKey('candidates.id'), primary_key=True)
+ name = Column(String, nullable=False)
+ novotes = Column(Integer, nullable=False)
+
+ #{ Special methods
+ def __repr__(self):
+ return '<VoteTally: id=%r election=%r group=%r>' % ( self.id,
+ self.election_id, self.group_name)
+
+ def __unicode__(self):
+ return self.group_name
+ #}
+
+class UserVoteCount(DeclarativeBase):
+
+ __tablename__ = 'uservotes'
+
+ #{ Columns
+ election_id = Column(Integer, ForeignKey('elections.id'), primary_key=True)
+ voter = Column(String, nullable=False, primary_key=True)
+ novotes = Column(Integer, nullable=False)
+
+ #{ Special methods
+ def __repr__(self):
+ return '<UserVoteCount: id=%r voter=%r novotes=%r>' % (
+ self.election_id, self.voter, self.novotes)
+
+ def __unicode__(self):
+ return self.group_name
+ #}
+
+class Elections(DeclarativeBase):
+ """
+ Define the different elections.
+ """
+ __tablename__ = 'elections'
+
+ #{ Columns
+ id = Column(Integer, autoincrement=True, primary_key=True)
+ shortdesc = Column(Unicode(150), unique=True, nullable=False)
+ alias = Column(Unicode(150), unique=True, nullable=False)
+ description = Column(Unicode(150), unique=True, nullable=False)
+ url = Column(Unicode(150), unique=True, nullable=False)
+ start_date = Column(DateTime, nullable=False)
+ end_date = Column(DateTime, nullable=False)
+ seats_elected = Column(Integer, nullable=False)
+ votes_per_user = Column(Integer, nullable=False)
+ embargoed = Column(Integer, nullable=False, default=0)
+ usefas = Column(Integer, nullable=False, default=0)
+ allow_nominations = Column(Integer, nullable=False, default=0)
+ nominations_until = Column(DateTime)
+
+ #{ Relations
+ legalVoters = relation('LegalVoters')
+ candidates = relation('Candidates')
+ uservotes = relation('UserVoteCount')
+
+ #{ Special methods
+ def __repr__(self):
+ return '<Elections: election=%r>' % self.shortdesc
+
+ def __unicode__(self):
+ return self.shortdesc
+ #}
+
+
+class Votes(DeclarativeBase):
+ """
+ Define the different votes.
+ """
+ __tablename__ = 'votes'
+
+ #{ Columns
+ id = Column(Integer, autoincrement=True, primary_key=True, unique=True)
+ election_id = Column(Integer, ForeignKey('elections.id'), nullable=False)
+ voter = Column(Unicode(150), nullable=False)
+ timestamp = Column(DateTime, nullable=False)
+ candidate_id = Column(Integer, ForeignKey('candidates.id'), nullable=False)
+ weight = Column(Integer, nullable=False)
+
+ #{ Special methods
+ def __repr__(self):
+ return '<Votes: voter=%r>' % self.voter
+
+ def __unicode__(self):
+ return self.voter
+ #}
+
+
+class Candidates(DeclarativeBase):
+ """
+ Define the candidates.
+ """
+ __tablename__ = 'candidates'
+
+ #{ Columns
+ id = Column(Integer, autoincrement=True, primary_key=True)
+ election_id = Column(Integer, ForeignKey('elections.id'),
+ primary_key=True, nullable=False)
+ name = Column(Unicode(150), nullable=False)
+ url = Column(Unicode(150))
+ formalname = Column(Unicode(150), nullable=True)
+ human = Column(Integer)
+ status = Column(Integer)
+
+ #{ Relations
+ #votes = relation('Votes', backref='candidate'),
+ #tally = relation('VoteTally', backref='candidate')
+
+ #{ Special methods
+ def __repr__(self):
+ return '<Candidates: candidate=%r>' % self.name
+
+ def __unicode__(self):
+ return self.name
+ #}
commit 4377aeeb9fe9f4577bbff24849c126e0251b1b7d
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sun Dec 4 21:50:00 2011 +0100
Remove prints and rework the entry into the database of the dates
diff --git a/elections2/lib/admin.py b/elections2/lib/admin.py
index 9a44b61..126c7ae 100644
--- a/elections2/lib/admin.py
+++ b/elections2/lib/admin.py
@@ -42,13 +42,12 @@ import sqlalchemy, tg
#from turbogears.database import session
-identity = request.environ.get('repoze.who.identity')
+request.identity = request.environ.get('repoze.who.identity')
class Admin(BaseController):
allow_only = predicates.in_group(config.get('admingroup', 'elections'))
def __init__(self, fas, appTitle):
- #print dir(fas), fas.username
self.fas = fas
self.appTitle = appTitle
@@ -106,8 +105,10 @@ class Admin(BaseController):
election.shortdesc=kw['shortdesc']
election.description=kw['info']
election.url=kw['url']
- election.start_date=kw['startdate']
- election.end_date=kw['enddate']
+ election.start_date= datetime.strptime(kw['startdate'],
+ "%Y-%m-%d %H:%M:%S")
+ election.end_date=datetime.strptime(kw['enddate'],
+ "%Y-%m-%d %H:%M:%S")
election.embargoed=setembargo
election.seats_elected=kw['seats']
election.usefas=usefas
@@ -174,7 +175,7 @@ class Admin(BaseController):
candidate = entry.split("!")
#Python doesn't have a good way of doing case/switch statements
if len(candidate) == 1:
- if len(candidate[0]) :
+ if len(candidate[0]):
c=Candidates()
c.election_id=kw['id']
c.name=candidate[0]
@@ -182,10 +183,10 @@ class Admin(BaseController):
c.human=1
model.DBSession.add(c)
elif len(candidate) == 2:
- if len(candidate[0]) :
+ if len(candidate[0]):
c = Candidates()
c.election_id=kw['id']
- c.name=candidate[0],
+ c.name=candidate[0]
c.url=candidate[1]
c.status=0
c.human=1
@@ -214,8 +215,10 @@ class Admin(BaseController):
election.shortdesc=kw['shortdesc']
election.description=kw['info']
election.url=kw['url']
- election.start_date=kw['startdate']
- election.end_date=kw['enddate']
+ election.start_date=election.end_date=datetime.strptime(kw['startdate'],
+ "%Y-%m-%d %H:%M:%S")
+ election.end_date=election.end_date=datetime.strptime(kw['enddate'],
+ "%Y-%m-%d %H:%M:%S")
election.embargoed=setembargo
election.seats_elected=kw['seats']
election.usefas=usefas
commit 9590908bdea3b3a004fbb511ca0620d6c0a01f21
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sun Dec 4 21:49:05 2011 +0100
Remove old prints and comment out admin not used
diff --git a/elections2/controllers/root.py b/elections2/controllers/root.py
index 83d4b60..430d6b7 100644
--- a/elections2/controllers/root.py
+++ b/elections2/controllers/root.py
@@ -43,7 +43,7 @@ class RootController(BaseController):
"""
secc = SecureController()
- admin = AdminController(model, DBSession, config_type=TGAdminConfig)
+ #admin = AdminController(model, DBSession, config_type=TGAdminConfig)
error = ErrorController()
@@ -176,7 +176,6 @@ class RootController(BaseController):
login_dict['login_counter'] = str(login_counter)
login_dict['page'] = 'login'
login_dict['came_from'] = came_from
- print csrf_login
return login_dict
@@ -252,12 +251,10 @@ class RootController(BaseController):
"""
## default code from TG2:
- print request.identity
if not request.identity:
login_counter = request.environ['repoze.who.logins'] + 1
redirect('/login', came_from=came_from, __logins=login_counter)
userid = request.identity['repoze.who.userid']
- print request.identity.keys()
flash(_('Welcome back, %s!') % userid)
redirect(came_from)
12 years, 5 months
2 commits - development.ini README.txt
by Pierre-YvesChibon
README.txt | 20 ++++++++++++++++++++
development.ini | 4 ++--
2 files changed, 22 insertions(+), 2 deletions(-)
New commits:
commit 9b20f5fe07af1dd448940b9d469c5b14cc811931
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sun Dec 4 19:38:06 2011 +0100
Let's do the default DB in sqlite
diff --git a/development.ini b/development.ini
index 7204752..7854255 100644
--- a/development.ini
+++ b/development.ini
@@ -46,8 +46,8 @@ beaker.session.secret = d0dc7a4f-1d03-4e22-a6f6-ecd21b8a6464
# If you have sqlite, here's a simple default to get you started
# in development
-#sqlalchemy.url = sqlite:///%(here)s/devdata.db
-sqlalchemy.url=postgresql://elections:elections2@localhost/elections
+sqlalchemy.url = sqlite:///%(here)s/devdata.db
+#sqlalchemy.url=postgresql://elections:elections2@localhost/elections
#echo shouldn't be used together with the logging module.
sqlalchemy.echo = false
sqlalchemy.echo_pool = false
commit 317e49b2b0e622e38db25afd5c12806c9b1019f1
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sun Dec 4 19:37:04 2011 +0100
Enhance documentation on how to setup elections
diff --git a/README.txt b/README.txt
index ffec506..e3e1643 100644
--- a/README.txt
+++ b/README.txt
@@ -1,6 +1,23 @@
This file is for you to describe the elections2 application. Typically
you would include information such as the information below:
+Dependencies
+============
+
+- TurboGears 2
+ tested with:
+ - TurboGears2-2.0.3-4.el6
+ - TurboGears2-2.1-0.3.rc1.dev1048.fc14
+- python-sqlalchemy
+ tested with:
+ - python-sqlalchemy-0.5.5-2.1.el6
+ - python-sqlalchemy-0.6.8-1.fc14
+- python-tgext-admin
+- python-repoze-what-quickstart
+- python-tgext-crud
+- python-sprox
+
+
Installation and Setup
======================
@@ -9,6 +26,9 @@ Install ``elections2`` using the setup.py script::
$ cd elections2
$ python setup.py install
+Create the egg_info
+ $ python setup.py egg_info
+
Create the project database for any model classes defined::
$ paster setup-app development.ini
12 years, 5 months