сделал
from quickwiki.model import init_model, meta
log = logging.getLogger(__name__)
# disable docutils security hazards:
# http://docutils.sourceforge.net/docs/howto/security.html
SAFE_DOCUTILS = dict(file_insertion_enabled=False, raw_enabled=False)
wikiwords = re.compile(r"\b([A-Z]\w+[A-Z]+\w+)", re.UNICODE)
def init_model(engine):
"""Call me before using any of the tables or classes in the model"""
Session.configure(bind=engine)
meta.metadata.bind = engine
model.metadata.create_all(checkfirst=True)
получаю
C:\project\qw\QuickWiki>paster setup-app development.ini
Running setup_config() from quickwiki.websetup
Traceback (most recent call last):
File "c:\Python25\Scripts\paster-script.py", line 8, in <module>
load_entry_point('pastescript==1.7.3', 'console_scripts', 'paster')()
File "c:\python25\lib\site-packages\pastescript-1.7.3-py2.5.egg\paste\script\c
ommand.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "c:\python25\lib\site-packages\pastescript-1.7.3-py2.5.egg\paste\script\c
ommand.py", line 123, in invoke
exit_code = runner.run(args)
File "c:\python25\lib\site-packages\pastescript-1.7.3-py2.5.egg\paste\script\a
ppinstall.py", line 68, in run
return super(AbstractInstallCommand, self).run(new_args)
File "c:\python25\lib\site-packages\pastescript-1.7.3-py2.5.egg\paste\script\c
ommand.py", line 218, in run
result = self.command()
File "c:\python25\lib\site-packages\pastescript-1.7.3-py2.5.egg\paste\script\a
ppinstall.py", line 456, in command
self, config_file, section, self.sysconfig_install_vars(installer))
File "c:\python25\lib\site-packages\pastescript-1.7.3-py2.5.egg\paste\script\a
ppinstall.py", line 598, in setup_config
mod.setup_app, command, filename, section, vars)
File "c:\python25\lib\site-packages\pastescript-1.7.3-py2.5.egg\paste\script\a
ppinstall.py", line 612, in _call_setup_app
func(command, conf, vars)
File "C:\project\qw\QuickWiki\quickwiki\websetup.py", line 12, in setup_app
load_environment(conf.global_conf, conf.local_conf)
File "C:\project\qw\QuickWiki\quickwiki\config\environment.py", line 50, in lo
ad_environment
init_model(engine)
File "C:\project\qw\QuickWiki\quickwiki\model\__init__.py", line 24, in init_m
odel
meta.metadata.bind = engine
AttributeError: 'module' object has no attribute 'metadata'