Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stop using removed `Configurator.with_context` method

  • Loading branch information...
commit 1be7fefca30658eba39a5f68cfb162914ea9e795 1 parent 163d74c
Mikołaj Siedlarek authored
Showing with 4 additions and 3 deletions.
  1. +3 −3 pyramid_layout/zcml.py
  2. +1 −0  setup.py
View
6 pyramid_layout/zcml.py
@@ -1,4 +1,4 @@
-from pyramid.config import Configurator
+from pyramid_zcml import with_context
from zope.configuration.fields import GlobalObject
from zope.interface import Interface
@@ -37,7 +37,7 @@ class IPanelDirective(Interface):
def panel(config_context, context=None, panel=None, name="", attr=None,
renderer=None):
- config = Configurator.with_context(config_context)
+ config = with_context(config_context)
config.add_panel(
context=context, panel=panel, name=name,
attr=attr, renderer=renderer)
@@ -73,7 +73,7 @@ class ILayoutDirective(Interface):
def layout(config_context, context=None, layout=None, name="", containment=None,
template=None):
- config = Configurator.with_context(config_context)
+ config = with_context(config_context)
config.add_layout(
context=context, layout=layout, name=name, containment=containment,
template=template)
View
1  setup.py
@@ -28,6 +28,7 @@
install_requires = [
'pyramid>=1.3.3', # requires mako fix
+ 'pyramid_zcml>=0.9.2', # requires `with_context()`
]
tests_require = install_requires + ['coverage', 'nose', 'mock',
'webtest']
Please sign in to comment.
Something went wrong with that request. Please try again.