diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-10-09 07:55:07 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-10-09 07:55:07 +0000 |
| commit | 4e7436febec1f4dc10a5b32fcc4020bea751226d (patch) | |
| tree | fb78a97e0a5f96d6a5b913cbe14b6a50f910e330 /docs/tutorials/bfgwiki2/src/views | |
| parent | e8a3613bc35083acc850f206876037a735b813ed (diff) | |
| download | pyramid-4e7436febec1f4dc10a5b32fcc4020bea751226d.tar.gz pyramid-4e7436febec1f4dc10a5b32fcc4020bea751226d.tar.bz2 pyramid-4e7436febec1f4dc10a5b32fcc4020bea751226d.zip | |
route -> static directive.
Diffstat (limited to 'docs/tutorials/bfgwiki2/src/views')
| -rw-r--r-- | docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml | 5 | ||||
| -rw-r--r-- | docs/tutorials/bfgwiki2/src/views/tutorial/views.py | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml b/docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml index 3a7ff7fc8..1e5207ebc 100644 --- a/docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml +++ b/docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml @@ -6,10 +6,9 @@ <subscriber for="repoze.bfg.interfaces.INewRequest" handler=".run.handle_teardown"/> - <route - path="/static/*subpath" + <static name="static" - view=".views.static_view" + path="templates/static" /> <route diff --git a/docs/tutorials/bfgwiki2/src/views/tutorial/views.py b/docs/tutorials/bfgwiki2/src/views/tutorial/views.py index f9af3d3c7..9a197bd75 100644 --- a/docs/tutorials/bfgwiki2/src/views/tutorial/views.py +++ b/docs/tutorials/bfgwiki2/src/views/tutorial/views.py @@ -5,7 +5,6 @@ from docutils.core import publish_parts from webob.exc import HTTPFound from repoze.bfg.chameleon_zpt import render_template_to_response -from repoze.bfg.view import static from repoze.bfg.url import route_url from tutorial.models import DBSession @@ -14,8 +13,6 @@ from tutorial.models import Page # regular expression used to find WikiWords wikiwords = re.compile(r"\b([A-Z]\w+[A-Z]+\w+)") -static_view = static('templates/static') - def view_wiki(request): return HTTPFound(location = route_url('view_page', request, pagename='FrontPage')) |
