Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor cleanup

git-svn-id: https://svn.bluedynamics.eu/svn/module/bda.bfg.tile/trunk@2065 f119a143-da5b-4457-81e3-bee00661a780
  • Loading branch information...
commit 9bf19e020091d9c54aa8a16a28045d2718cfbedf 1 parent 4f2807d
rnix authored
Showing with 2 additions and 8 deletions.
  1. +2 −8 src/bda/bfg/tile/_api.txt
View
10 src/bda/bfg/tile/_api.txt
@@ -10,6 +10,7 @@ Imports.
We need some dummies as model and request.
::
+ >>> from repoze.bfg.threadlocal import get_current_registry
>>> class Model(object): pass
>>> model = Model()
>>> from repoze.bfg.request import Request
@@ -18,19 +19,12 @@ We need some dummies as model and request.
... 'QUERY_STRING':''
... }
>>> request = Request(environ=environ)
-
-For bfg we need to hook our registry into zca.
-::
-
- >>> from zope.component import getSiteManager
- >>> from repoze.bfg.threadlocal import get_current_registry
- >>> sm = getSiteManager.sethook(get_current_registry)
+ >>> request.registry = get_current_registry()
The pure Tile itself. Normally you do not create this directly, this is done
due registration, see below.
::
- >>> request.registry = get_current_registry()
>>> mytile = Tile('bda.bfg.tile:testdata/tile1.pt', 'render', 'foo')
>>> mytile(model, request)
u'<span>Tile One</span>'
Please sign in to comment.
Something went wrong with that request. Please try again.