Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

git-svn-id: https://svn.bluedynamics.eu/svn/module/bda.bfg.tile/trunk…

…@1780 f119a143-da5b-4457-81e3-bee00661a780
  • Loading branch information...
commit 49785de30fcb2e4bddf801abc92185058ca0eb0d 1 parent 4b072de
rnix authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 src/bda/bfg/tile/_api.py
13 src/bda/bfg/tile/_api.py
View
@@ -171,7 +171,8 @@ def _permitted(context, request):
# Registration
def registerTile(name, path=None, attribute='render',
interface=Interface, _class=Tile,
- permission='view', strict=True, _level=2):
+ permission='view', strict=True, tile_interface=ITile,
+ _level=2):
"""registers a tile.
``name``
@@ -202,6 +203,10 @@ def registerTile(name, path=None, attribute='render',
``False`` the exception is consumed and an empty unicode string is
returned.
+ ``tile_interface``
+ An optional interface which acts as tile interface. Defaults to
+ ``ITile``.
+
``_level``
is a bit special to make doctests pass the magic path-detection.
you must never touch it in application code.
@@ -224,7 +229,7 @@ class tile(object):
def __init__(self, name, path=None, attribute='render',
interface=Interface, permission='view',
- strict=True, _level=2):
+ strict=True, tile_interface=ITile, _level=2):
""" see ``registerTile`` for details on the other parameters.
"""
self.name = name
@@ -235,6 +240,7 @@ def __init__(self, name, path=None, attribute='render',
self.interface = interface
self.permission = permission
self.strict = strict
+ self.tile_interface = tile_interface
def __call__(self, ob):
registerTile(self.name,
@@ -243,5 +249,6 @@ def __call__(self, ob):
interface=self.interface,
_class=ob,
permission=self.permission,
- strict=self.strict)
+ strict=self.strict,
+ tile_interface=self.tile_interface)
return ob
Please sign in to comment.
Something went wrong with that request. Please try again.