mirror of
https://github.com/datafolklabs/cement.git
synced 2026-02-06 13:42:03 +00:00
Resolve GH#27 Remove unused app_basepath from config templates
This commit is contained in:
parent
473e5f48fe
commit
327fa92d3a
@ -9,8 +9,10 @@
|
||||
a command in the 'mynam' namespace, mynam.config['myoption'] is set as well
|
||||
as any other namespace that has that config key.
|
||||
+ log.warn on OptionConflictError
|
||||
|
||||
|
||||
- Don't render genshi output if --quiet is passed
|
||||
- Resolve GH#6 Make plugin templates pass full version, required_cement_api,
|
||||
etc when registering their namespace
|
||||
|
||||
0.8 - Mar 24, 2010
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@ dcf['config_source'] = ['defaults']
|
||||
dcf['app_name'] = '{{package}}' # name for cli like /etc/<app_name>
|
||||
dcf['app_egg_name'] = '{{package}}' # name from setup.py
|
||||
dcf['app_module'] = '{{package}}' # name of the library dir
|
||||
dcf['app_basepath'] = os.path.dirname(__file__)
|
||||
|
||||
dcf['enabled_plugins'] = [] # no default plugins, add via the config file
|
||||
dcf['debug'] = False
|
||||
|
||||
@ -5,7 +5,13 @@ from cement.core.namespace import CementNamespace, register_namespace
|
||||
define_hook('my_example_hook')
|
||||
|
||||
# Setup the 'example' namespace object
|
||||
example = CementNamespace('example', controller='ExampleController')
|
||||
example = CementNamespace(
|
||||
label='example',
|
||||
controller='ExampleController',
|
||||
description='Example Plugin for helloworld',
|
||||
version='0.1',
|
||||
required_cement_api='0.7-0.8:20100210'
|
||||
)
|
||||
|
||||
# Example namespace default configurations, overwritten by the [example]
|
||||
# section of the applications config file(s). Once registered, this dict is
|
||||
|
||||
@ -16,6 +16,10 @@ from helloworld.model.example import ExampleModel
|
||||
log = get_logger(__name__)
|
||||
|
||||
class ExampleController(CementController):
|
||||
@expose()
|
||||
def test(self, *args, **kw):
|
||||
config = get_config()
|
||||
|
||||
@expose(namespace='example') # no template
|
||||
def ex1(self, *args, **kw):
|
||||
"""
|
||||
|
||||
@ -20,7 +20,6 @@ dcf['config_source'] = ['defaults']
|
||||
dcf['app_name'] = 'helloworld' # name for cli like /etc/<app_name>
|
||||
dcf['app_egg_name'] = 'helloworld' # name from setup.py
|
||||
dcf['app_module'] = 'helloworld' # name of the library dir
|
||||
dcf['app_basepath'] = os.path.dirname(__file__)
|
||||
|
||||
dcf['enabled_plugins'] = [] # no default plugins, add via the config file
|
||||
dcf['debug'] = False
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
from setuptools import setup, find_packages
|
||||
import sys, os
|
||||
|
||||
# Note to distro packagers: This application requires Cement API
|
||||
# version 0.7-0.8:20100210
|
||||
|
||||
setup(name='helloworld',
|
||||
version='0.1',
|
||||
description='',
|
||||
|
||||
@ -40,7 +40,6 @@ def test_validate_config():
|
||||
dcf['app_name'] = 'helloworld' # name for cli like /etc/<app_name>
|
||||
dcf['app_egg_name'] = 'helloworld' # name from setup.py
|
||||
dcf['app_module'] = 'helloworld' # name of the library dir
|
||||
dcf['app_basepath'] = os.path.dirname(__file__)
|
||||
|
||||
dcf['enabled_plugins'] = [] # no default plugins, add via the config file
|
||||
dcf['debug'] = False
|
||||
|
||||
Loading…
Reference in New Issue
Block a user