diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-28 04:29:03 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-28 04:29:03 +0000 |
| commit | 9d1701f7ac2f91d734fb9571d139ac57ed3e7983 (patch) | |
| tree | a0b1232aa0233712ffe1ebd7758750eb0c26b094 | |
| parent | 38a798237870aa2c42d6f2b5ffd2f1bcae225d62 (diff) | |
| download | pyramid-9d1701f7ac2f91d734fb9571d139ac57ed3e7983.tar.gz pyramid-9d1701f7ac2f91d734fb9571d139ac57ed3e7983.tar.bz2 pyramid-9d1701f7ac2f91d734fb9571d139ac57ed3e7983.zip | |
General fixes.
6 files changed, 19 insertions, 23 deletions
diff --git a/repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl b/repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl index 45253d080..d4798bce7 100644 --- a/repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl +++ b/repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl @@ -11,9 +11,8 @@ class ViewTests(unittest.TestCase): def test_my_view(self): from {{package}}.views import my_view - context = testing.DummyModel() request = testing.DummyRequest() - info = my_view(context, request) + info = my_view(request) self.assertEqual(info['project'], '{{project}}') diff --git a/repoze/bfg/paster_templates/zodb/+package+/run.py_tmpl b/repoze/bfg/paster_templates/zodb/+package+/run.py_tmpl index c9023f822..3ad6a8970 100644 --- a/repoze/bfg/paster_templates/zodb/+package+/run.py_tmpl +++ b/repoze/bfg/paster_templates/zodb/+package+/run.py_tmpl @@ -1,12 +1,12 @@ from repoze.bfg.configuration import Configurator from repoze.zodbconn.finder import PersistentApplicationFinder +from {{package}}.models import appmaker def app(global_config, **settings): - """ This function returns a repoze.bfg.router.Router object. + """ This function returns a ``repoze.bfg`` WSGI application object. It is usually called by the PasteDeploy framework during ``paster serve``. """ - from {{package}}.models import appmaker zodb_uri = settings.get('zodb_uri') if zodb_uri is None: raise ValueError("No 'zodb_uri' in application configuration.") diff --git a/repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl b/repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl index 54cbe2f6e..5c7d27a37 100644 --- a/repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl +++ b/repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl @@ -11,8 +11,7 @@ class ViewTests(unittest.TestCase): def test_my_view(self): from {{package}}.views import my_view - context = testing.DummyModel() request = testing.DummyRequest() - info = my_view(context, request) + info = my_view(request) self.assertEqual(info['project'], '{{project}}') diff --git a/repoze/bfg/paster_templates/zodb/+package+/views.py_tmpl b/repoze/bfg/paster_templates/zodb/+package+/views.py_tmpl index adec7f939..12ed8832d 100644 --- a/repoze/bfg/paster_templates/zodb/+package+/views.py_tmpl +++ b/repoze/bfg/paster_templates/zodb/+package+/views.py_tmpl @@ -1,2 +1,2 @@ -def my_view(context, request): +def my_view(request): return {'project':'{{project}}'} diff --git a/repoze/bfg/paster_templates/zodb/CHANGES.txt_tmpl b/repoze/bfg/paster_templates/zodb/CHANGES.txt_tmpl index 1544cf53b..35a34f332 100644 --- a/repoze/bfg/paster_templates/zodb/CHANGES.txt_tmpl +++ b/repoze/bfg/paster_templates/zodb/CHANGES.txt_tmpl @@ -1,3 +1,4 @@ -0.1 +0.0 +--- - Initial version +- Initial version diff --git a/repoze/bfg/paster_templates/zodb/setup.py_tmpl b/repoze/bfg/paster_templates/zodb/setup.py_tmpl index ef5acd42f..8de2e5a1b 100644 --- a/repoze/bfg/paster_templates/zodb/setup.py_tmpl +++ b/repoze/bfg/paster_templates/zodb/setup.py_tmpl @@ -6,35 +6,32 @@ here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() +requires = [ + 'repoze.bfg', + 'repoze.zodbconn', + 'repoze.tm', + 'ZODB3', + ] + setup(name='{{project}}', version='0.1', description='{{project}}', long_description=README + '\n\n' + CHANGES, classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", "Programming Language :: Python", + "Framework :: BFG", "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], author='', author_email='', url='', - keywords='web wsgi bfg zope', + keywords='web wsgi bfg', packages=find_packages(), include_package_data=True, zip_safe=False, - install_requires=[ - 'repoze.bfg', - 'repoze.zodbconn', - 'repoze.tm', - 'ZODB3', - ], - tests_require=[ - 'repoze.bfg', - ], + install_requires = requires, + tests_require= requires, test_suite="{{package}}", entry_points = """\ [paste.app_factory] |
