summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaul Everitt <paul@agendaless.com>2013-10-09 13:53:21 -0400
committerPaul Everitt <paul@agendaless.com>2013-10-09 13:53:21 -0400
commitd6476034e0fed99ad8f24839cfd9a315a92e7c95 (patch)
tree7939755cd887cbf3cf31fbba93f9cbb580d3afc4 /docs
parentbd3d23330abfe39182b7c47f79f61f26e20d1221 (diff)
parent85aef4a4c0157a59bfd7ea9b3a58b842ac4de0f0 (diff)
downloadpyramid-d6476034e0fed99ad8f24839cfd9a315a92e7c95.tar.gz
pyramid-d6476034e0fed99ad8f24839cfd9a315a92e7c95.tar.bz2
pyramid-d6476034e0fed99ad8f24839cfd9a315a92e7c95.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/introduction.rst12
-rw-r--r--docs/narr/project.rst12
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/tests.py8
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/views.py4
-rw-r--r--docs/tutorials/wiki2/src/tests/tutorial/tests.py8
-rw-r--r--docs/tutorials/wiki2/src/tests/tutorial/views.py4
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/tests.py8
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/views.py4
8 files changed, 36 insertions, 24 deletions
diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst
index bb2d85e94..a9c5fdfbd 100644
--- a/docs/narr/introduction.rst
+++ b/docs/narr/introduction.rst
@@ -417,12 +417,12 @@ Sessions
Pyramid has built-in HTTP sessioning. This allows you to associate data with
otherwise anonymous users between requests. Lots of systems do this. But
-Pyramid also allows you to plug in your own sessioning system by creating
-some code that adheres to a documented interface. Currently there is a
-binding package for the third-party Beaker sessioning system that does exactly
-this. But if you have a specialized need (perhaps you want to store your
-session data in MongoDB), you can. You can even switch between
-implementations without changing your application code.
+Pyramid also allows you to plug in your own sessioning system by creating some
+code that adheres to a documented interface. Currently there is a binding
+package for the third-party Redis sessioning system that does exactly this.
+But if you have a specialized need (perhaps you want to store your session data
+in MongoDB), you can. You can even switch between implementations without
+changing your application code.
Example: :ref:`sessions_chapter`.
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 8b7c24725..d7292d187 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -259,6 +259,8 @@ single sample test exists.
single: reload
single: startup
+.. _running_the_project_application:
+
Running The Project Application
-------------------------------
@@ -600,6 +602,8 @@ server which listens on TCP port 6543. It is configured to listen on all
interfaces (``0.0.0.0``). This means that any remote system which has TCP
access to your system can see your Pyramid application.
+.. _MyProject_ini_logging:
+
The sections that live between the markers ``# Begin logging configuration``
and ``# End logging configuration`` represent Python's standard library
:mod:`logging` module configuration for your application. The sections
@@ -885,6 +889,14 @@ returns the HTML in a :term:`response`.
.. note:: Dictionaries provide values to :term:`template`\s.
+.. note:: When the application is run with the scaffold's :ref:`default
+ development.ini <MyProject_ini>` configuration :ref:`logging is set up
+ <MyProject_ini_logging>` to aid debugging. If an exception is raised,
+ uncaught tracebacks are displayed after the startup messages on :ref:`the
+ console running the server <running_the_project_application>`. Also
+ ``print()`` statements may be inserted into the application for debugging
+ to send output to this console.
+
.. note:: ``development.ini`` has a setting that controls how templates are
reloaded, ``pyramid.reload_templates``.
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/tests.py b/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
index 5dcee127b..9f01d2da5 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
@@ -14,7 +14,7 @@ def _initTestingDB():
Base.metadata.create_all(engine)
DBSession.configure(bind=engine)
with transaction.manager:
- model = Page('FrontPage', 'This is the front page')
+ model = Page(name='FrontPage', data='This is the front page')
DBSession.add(model)
return DBSession
@@ -59,7 +59,7 @@ class ViewPageTests(unittest.TestCase):
from tutorial.models import Page
request = testing.DummyRequest()
request.matchdict['pagename'] = 'IDoExist'
- page = Page('IDoExist', 'Hello CruelWorld IDoExist')
+ page = Page(name='IDoExist', data='Hello CruelWorld IDoExist')
self.session.add(page)
_registerRoutes(self.config)
info = self._callFUT(request)
@@ -126,7 +126,7 @@ class EditPageTests(unittest.TestCase):
_registerRoutes(self.config)
request = testing.DummyRequest()
request.matchdict = {'pagename':'abc'}
- page = Page('abc', 'hello')
+ page = Page(name='abc', data='hello')
self.session.add(page)
info = self._callFUT(request)
self.assertEqual(info['page'], page)
@@ -139,7 +139,7 @@ class EditPageTests(unittest.TestCase):
request = testing.DummyRequest({'form.submitted':True,
'body':'Hello yo!'})
request.matchdict = {'pagename':'abc'}
- page = Page('abc', 'hello')
+ page = Page(name='abc', data='hello')
self.session.add(page)
response = self._callFUT(request)
self.assertEqual(response.location, 'http://example.com/abc')
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/views.py b/docs/tutorials/wiki2/src/authorization/tutorial/views.py
index 0d085b0e2..b6dbbf5f6 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/views.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/views.py
@@ -63,12 +63,12 @@ def add_page(request):
pagename = request.matchdict['pagename']
if 'form.submitted' in request.params:
body = request.params['body']
- page = Page(pagename, body)
+ page = Page(name=pagename, data=body)
DBSession.add(page)
return HTTPFound(location = request.route_url('view_page',
pagename=pagename))
save_url = request.route_url('add_page', pagename=pagename)
- page = Page('', '')
+ page = Page(name='', data='')
return dict(page=page, save_url=save_url,
logged_in=authenticated_userid(request))
diff --git a/docs/tutorials/wiki2/src/tests/tutorial/tests.py b/docs/tutorials/wiki2/src/tests/tutorial/tests.py
index 3e96d0a82..4ee30685e 100644
--- a/docs/tutorials/wiki2/src/tests/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/tests/tutorial/tests.py
@@ -15,7 +15,7 @@ def _initTestingDB():
Base.metadata.create_all(engine)
DBSession.configure(bind=engine)
with transaction.manager:
- model = Page('FrontPage', 'This is the front page')
+ model = Page(name='FrontPage', data='This is the front page')
DBSession.add(model)
return DBSession
@@ -82,7 +82,7 @@ class ViewPageTests(unittest.TestCase):
from tutorial.models import Page
request = testing.DummyRequest()
request.matchdict['pagename'] = 'IDoExist'
- page = Page('IDoExist', 'Hello CruelWorld IDoExist')
+ page = Page(name='IDoExist', data='Hello CruelWorld IDoExist')
self.session.add(page)
_registerRoutes(self.config)
info = self._callFUT(request)
@@ -150,7 +150,7 @@ class EditPageTests(unittest.TestCase):
_registerRoutes(self.config)
request = testing.DummyRequest()
request.matchdict = {'pagename':'abc'}
- page = Page('abc', 'hello')
+ page = Page(name='abc', data='hello')
self.session.add(page)
info = self._callFUT(request)
self.assertEqual(info['page'], page)
@@ -163,7 +163,7 @@ class EditPageTests(unittest.TestCase):
request = testing.DummyRequest({'form.submitted':True,
'body':'Hello yo!'})
request.matchdict = {'pagename':'abc'}
- page = Page('abc', 'hello')
+ page = Page(name='abc', data='hello')
self.session.add(page)
response = self._callFUT(request)
self.assertEqual(response.location, 'http://example.com/abc')
diff --git a/docs/tutorials/wiki2/src/tests/tutorial/views.py b/docs/tutorials/wiki2/src/tests/tutorial/views.py
index 0d085b0e2..b6dbbf5f6 100644
--- a/docs/tutorials/wiki2/src/tests/tutorial/views.py
+++ b/docs/tutorials/wiki2/src/tests/tutorial/views.py
@@ -63,12 +63,12 @@ def add_page(request):
pagename = request.matchdict['pagename']
if 'form.submitted' in request.params:
body = request.params['body']
- page = Page(pagename, body)
+ page = Page(name=pagename, data=body)
DBSession.add(page)
return HTTPFound(location = request.route_url('view_page',
pagename=pagename))
save_url = request.route_url('add_page', pagename=pagename)
- page = Page('', '')
+ page = Page(name='', data='')
return dict(page=page, save_url=save_url,
logged_in=authenticated_userid(request))
diff --git a/docs/tutorials/wiki2/src/views/tutorial/tests.py b/docs/tutorials/wiki2/src/views/tutorial/tests.py
index 5dcee127b..9f01d2da5 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/views/tutorial/tests.py
@@ -14,7 +14,7 @@ def _initTestingDB():
Base.metadata.create_all(engine)
DBSession.configure(bind=engine)
with transaction.manager:
- model = Page('FrontPage', 'This is the front page')
+ model = Page(name='FrontPage', data='This is the front page')
DBSession.add(model)
return DBSession
@@ -59,7 +59,7 @@ class ViewPageTests(unittest.TestCase):
from tutorial.models import Page
request = testing.DummyRequest()
request.matchdict['pagename'] = 'IDoExist'
- page = Page('IDoExist', 'Hello CruelWorld IDoExist')
+ page = Page(name='IDoExist', data='Hello CruelWorld IDoExist')
self.session.add(page)
_registerRoutes(self.config)
info = self._callFUT(request)
@@ -126,7 +126,7 @@ class EditPageTests(unittest.TestCase):
_registerRoutes(self.config)
request = testing.DummyRequest()
request.matchdict = {'pagename':'abc'}
- page = Page('abc', 'hello')
+ page = Page(name='abc', data='hello')
self.session.add(page)
info = self._callFUT(request)
self.assertEqual(info['page'], page)
@@ -139,7 +139,7 @@ class EditPageTests(unittest.TestCase):
request = testing.DummyRequest({'form.submitted':True,
'body':'Hello yo!'})
request.matchdict = {'pagename':'abc'}
- page = Page('abc', 'hello')
+ page = Page(name='abc', data='hello')
self.session.add(page)
response = self._callFUT(request)
self.assertEqual(response.location, 'http://example.com/abc')
diff --git a/docs/tutorials/wiki2/src/views/tutorial/views.py b/docs/tutorials/wiki2/src/views/tutorial/views.py
index 5a9c75a61..42ef77b98 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/views.py
+++ b/docs/tutorials/wiki2/src/views/tutorial/views.py
@@ -47,12 +47,12 @@ def add_page(request):
pagename = request.matchdict['pagename']
if 'form.submitted' in request.params:
body = request.params['body']
- page = Page(pagename, body)
+ page = Page(name=pagename, data=body)
DBSession.add(page)
return HTTPFound(location = request.route_url('view_page',
pagename=pagename))
save_url = request.route_url('add_page', pagename=pagename)
- page = Page('', '')
+ page = Page(name='', data='')
return dict(page=page, save_url=save_url)
@view_config(route_name='edit_page', renderer='templates/edit.pt')