summaryrefslogtreecommitdiff
path: root/docs/narr/MyProject/myproject/__init__.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-11-12 20:05:48 -0500
committerChris McDonough <chrism@plope.com>2011-11-12 20:05:48 -0500
commit8595a7757b9347597e5664cc2c631f494825103e (patch)
tree4d4351aa77265658920f5353228a46545d849737 /docs/narr/MyProject/myproject/__init__.py
parentc7b6c1373ff3c971012964ad2dcab069f2548fb2 (diff)
downloadpyramid-8595a7757b9347597e5664cc2c631f494825103e.tar.gz
pyramid-8595a7757b9347597e5664cc2c631f494825103e.tar.bz2
pyramid-8595a7757b9347597e5664cc2c631f494825103e.zip
make myproject project relocatable (as per Ken's changes)
Diffstat (limited to 'docs/narr/MyProject/myproject/__init__.py')
-rw-r--r--docs/narr/MyProject/myproject/__init__.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/docs/narr/MyProject/myproject/__init__.py b/docs/narr/MyProject/myproject/__init__.py
index 04e219e36..ddcdd7162 100644
--- a/docs/narr/MyProject/myproject/__init__.py
+++ b/docs/narr/MyProject/myproject/__init__.py
@@ -1,12 +1,10 @@
from pyramid.config import Configurator
-from myproject.resources import Root
+from .resources import Root
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
config = Configurator(root_factory=Root, settings=settings)
- config.add_view('myproject.views.my_view',
- context='myproject.resources.Root',
- renderer='myproject:templates/mytemplate.pt')
- config.add_static_view('static', 'myproject:static')
+ config.add_static_view('static', 'static', cache_max_age=3600)
+ config.scan()
return config.make_wsgi_app()