...ah yes, this can be reduced to a few lines and one python file.
I've used the weberror package for static files (e.g. "plus.jpg"). It
doesn't matter if it's the same directory twice.
The second registered static directory doesn't work.
If config.commit() is removed, it works.
Or are configurator functions not meant to be used like this?
--------------------------------------------------------------------------------------------------------------------------
from pyramid.config import Configurator
class pool(object):
def __init__(self):
pass
pool = pool()
def getRoot(request):
return pool
def RegisterViews1(config):
config.add_static_view(name="m1",path="weberror:eval-media")
def RegisterViews2(config):
config.add_static_view(name="m2",path="weberror:eval-media")
def main(global_config, **settings):
portal = getRoot(None)
config = Configurator(root_factory = getRoot, settings = settings)
config.include(RegisterViews1)
config.commit()
config.include(RegisterViews2)
config.commit()
return config.make_wsgi_app()
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.