Hello,

Struggling get to panels executed, i.e. Pyramid renders None instead of 
panel content. I have the following code in myapp/__init__.py

@event_source
def configure_panels(config):
config.include("pyramid_layout")

@event_source
def configure_views(config): 
...

# adds cornice
config.include("cornice")

# adds panels
config.include("pyramid_layout")
from . import panels
config.include("myapp.panels.dashboard")
config.scan(panels)

from . import views
config.scan(views)


def main(global_config, **settings):
"""This function returns a Pyramid WSGI application."""
with Configurator(settings=settings) as config:
# Core view and layout related
...
configure_views(config)
configure_panels(config)
...

Which is supposed to load views and panels but the panels are not executed. 

What works is manually adding a panel in myapp/panels/dashboard/__init__.py 
i.e.:

def includeme(config):
"""Configure dashboard panels."""
config.include("pyramid_layout")

# !!! This does not work
# I have an empty __init__.py in the panels/dashboard module
config.scan("myapp.panels.dashboard")

# Manual panel addition (only this works)
config.add_panel(
"myapp.panels.dashboard.dashboard.test_panel",
name="test_panel",
renderer="string",
)

I'd really prefer adding the panels declaratively. Thank you all in advance.

__ntny__

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/pylons-discuss/e1327a42-0360-4182-9b6c-aed2ee6b7139n%40googlegroups.com.

Reply via email to