Permalink
Browse files

modernize

  • Loading branch information...
1 parent 7a05ff5 commit d718d1832d04bf76f13ed70ef69f8c29ebfe2c63 @mcdonc mcdonc committed Feb 15, 2012
Showing with 17 additions and 16 deletions.
  1. +2 −0 CHANGES.txt
  2. +5 −5 cluegun/__init__.py
  3. +6 −8 development.ini
  4. +4 −3 setup.py
View
@@ -1,6 +1,8 @@
Next release
------------
+- Use pyramid_tm and pyramid_zodbconn rather than repoze equivalents.
+
- Changed to disuse repoze.who and use decorators instead of ZCML.
- Forked from repoze.cluebin after 0.1.
View
@@ -2,16 +2,16 @@
from pyramid.authentication import AuthTktAuthenticationPolicy
from cluegun.models import appmaker
-from repoze.zodbconn.finder import PersistentApplicationFinder
+from pyramid_zodbconn import get_connection
+
+def root_factory(request):
+ conn = get_connection(request)
+ return appmaker(conn.root())
def main(global_config, **settings):
- db_path = settings.get('db_path', None)
- if db_path is None:
- raise ValueError('db_path must not be None')
passwd_file = settings.get('password_file', None)
if passwd_file is None:
raise ValueError('password_file must not be None')
- root_factory = PersistentApplicationFinder('file://%s' % db_path, appmaker)
config = Configurator(
root_factory = root_factory,
settings = settings,
View
@@ -1,14 +1,12 @@
-[app:cluegun]
+[app:main]
use = egg:cluegun
-db_path = %(here)s/cluegun.db
password_file = %(here)s/cluegun.passwd
-
-[pipeline:main]
-pipeline = egg:repoze.zodbconn#closer
- egg:repoze.tm2#tm
- cluegun
+pyramid.includes = pyramid_tm
+ pyramid_zodbconn
+tm.attempts = 3
+zodbconn.uri = file://%(here)s/cluegun.db
[server:main]
-use = egg:Paste#http
+use = egg:waitress#main
host = 0.0.0.0
port = 6543
View
@@ -21,14 +21,15 @@
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
- 'pyramid>=1.0a7',
- 'repoze.tm2',
+ 'pyramid>=1.3a7',
+ 'pyramid_tm',
'repoze.monty',
'ZODB3',
'Pygments',
'FormEncode',
- 'repoze.zodbconn',
+ 'pyramid_zodbconn',
'repoze.folder',
+ 'waitress',
]
__version__ = '0.0'

0 comments on commit d718d18

Please sign in to comment.