From e35dc1a58a4e91977dc9819c80259f09800a0b58 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 18 Aug 2008 04:06:35 +0000 Subject: - Generated application differences: ``make_app`` entry point renamed to ``app`` in order to have a different name than the bfg function of the same name, to prevent confusion. - Add "options" processing to bfg's ``make_app`` to support runtime options. A new API function named ``get_options`` was added to the registry module. This function is typically used in an application's ``app`` entry point. The Paste config file section for the app can now supply the ``reload_templates`` option, which, if true, will prevent the need to restart the appserver in order for ``z3c.pt`` or XSLT template changes to be detected. - Use only the module name in generated project's "test_suite" (run all tests found in the package). - Default port for generated apps changed from 5432 to 6543 (Postgres default port is 6543). --- repoze/bfg/zcml.py | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'repoze/bfg/zcml.py') diff --git a/repoze/bfg/zcml.py b/repoze/bfg/zcml.py index bb37c6581..343abc1d7 100644 --- a/repoze/bfg/zcml.py +++ b/repoze/bfg/zcml.py @@ -2,44 +2,17 @@ from zope.component.zcml import handler from zope.component.interface import provideInterface from zope.configuration.exceptions import ConfigurationError from zope.configuration.fields import GlobalObject -from zope.configuration.fields import Bool from zope.interface import Interface -from zope.interface import implements from zope.schema import TextLine from repoze.bfg.interfaces import IRequest from repoze.bfg.interfaces import IViewPermission from repoze.bfg.interfaces import IView -from repoze.bfg.interfaces import ISettings from repoze.bfg.security import ViewPermissionFactory -def _handler(*arg, **kw): - import pdb; pdb.set_trace() - return handler(*arg, **kw) - -class Settings(object): - implements(ISettings) - def __init__(self, reload_templates=False): - self.reload_templates = reload_templates - -def settings(_context, reload_templates=False): - settings = Settings(reload_templates=reload_templates) - _context.action( - discriminator = ('settings', ISettings), - callable = handler, - args = ('registerUtility', settings, ISettings, '', _context.info), - ) - -class ISettingsDirective(Interface): - reload_templates = Bool( - title=u"Reload templates when they change", - description=(u"Specifies whether templates should be reloaded when" - "a change is made"), - default=False) - def view(_context, permission=None, for_=None, -- cgit v1.2.3