Permalink
Browse files

merge master to feature.introspection

  • Loading branch information...
mcdonc committed Nov 28, 2011
2 parents 8786a57 + 14e5fa9 commit dafb0b3271f525fb8552d155a4dd840ced1656c8
Showing with 1,875 additions and 1,187 deletions.
  1. +0 −3 .gitmodules
  2. +16 −1 CHANGES.txt
  3. +1 −0 docs/.gitignore
  4. +3 −5 docs/Makefile
  5. +0 −1 docs/_themes
  6. +4 −7 docs/api/paster.rst
  7. +22 −7 docs/conf.py
  8. +5 −0 docs/glossary.rst
  9. +8 −7 docs/narr/MyProject/myproject/static/pylons.css
  10. +23 −53 docs/narr/MyProject/myproject/templates/mytemplate.pt
  11. +23 −14 docs/tutorials/wiki/authorization.rst
  12. +2 −2 docs/tutorials/wiki/basiclayout.rst
  13. +0 −43 docs/tutorials/wiki/src/authorization/tutorial/login.py
  14. +44 −1 docs/tutorials/wiki/src/authorization/tutorial/views.py
  15. +0 −43 docs/tutorials/wiki/src/tests/tutorial/login.py
  16. +44 −1 docs/tutorials/wiki/src/tests/tutorial/views.py
  17. +3 −4 docs/tutorials/wiki/tests.rst
  18. +78 −75 docs/tutorials/wiki2/authorization.rst
  19. +109 −86 docs/tutorials/wiki2/basiclayout.rst
  20. +70 −33 docs/tutorials/wiki2/definingmodels.rst
  21. +81 −80 docs/tutorials/wiki2/definingviews.rst
  22. +127 −21 docs/tutorials/wiki2/installation.rst
  23. +0 −3 docs/tutorials/wiki2/src/authorization/README.txt
  24. +7 −1 docs/tutorials/wiki2/src/authorization/development.ini
  25. +1 −0 docs/tutorials/wiki2/src/authorization/production.ini
  26. +2 −1 docs/tutorials/wiki2/src/authorization/setup.py
  27. +6 −19 docs/tutorials/wiki2/src/authorization/tutorial/__init__.py
  28. +0 −37 docs/tutorials/wiki2/src/authorization/tutorial/login.py
  29. +13 −24 docs/tutorials/wiki2/src/authorization/tutorial/models.py
  30. +1 −0 docs/tutorials/wiki2/src/authorization/tutorial/scripts/__init__.py
  31. +35 −0 docs/tutorials/wiki2/src/authorization/tutorial/scripts/populate.py
  32. +0 −1 docs/tutorials/wiki2/src/authorization/tutorial/security.py
  33. +16 −7 docs/tutorials/wiki2/src/authorization/tutorial/tests.py
  34. +64 −12 docs/tutorials/wiki2/src/authorization/tutorial/views.py
  35. +0 −3 docs/tutorials/wiki2/src/basiclayout/README.txt
  36. +7 −1 docs/tutorials/wiki2/src/basiclayout/development.ini
  37. +1 −0 docs/tutorials/wiki2/src/basiclayout/production.ini
  38. +2 −0 docs/tutorials/wiki2/src/basiclayout/setup.py
  39. +4 −6 docs/tutorials/wiki2/src/basiclayout/tutorial/__init__.py
  40. +11 −26 docs/tutorials/wiki2/src/basiclayout/tutorial/models.py
  41. +1 −0 docs/tutorials/wiki2/src/basiclayout/tutorial/scripts/__init__.py
  42. +35 −0 docs/tutorials/wiki2/src/basiclayout/tutorial/scripts/populate.py
  43. +1 −1 docs/tutorials/wiki2/src/basiclayout/tutorial/templates/mytemplate.pt
  44. +17 −8 docs/tutorials/wiki2/src/basiclayout/tutorial/tests.py
  45. +9 −5 docs/tutorials/wiki2/src/basiclayout/tutorial/views.py
  46. +0 −3 docs/tutorials/wiki2/src/models/README.txt
  47. +7 −1 docs/tutorials/wiki2/src/models/development.ini
  48. +1 −0 docs/tutorials/wiki2/src/models/production.ini
  49. +2 −0 docs/tutorials/wiki2/src/models/setup.py
  50. +6 −6 docs/tutorials/wiki2/src/models/tutorial/__init__.py
  51. +10 −23 docs/tutorials/wiki2/src/models/tutorial/models.py
  52. +1 −0 docs/tutorials/wiki2/src/models/tutorial/scripts/__init__.py
  53. +35 −0 docs/tutorials/wiki2/src/models/tutorial/scripts/populate.py
  54. +1 −1 docs/tutorials/wiki2/src/models/tutorial/templates/mytemplate.pt
  55. +17 −7 docs/tutorials/wiki2/src/models/tutorial/tests.py
  56. +9 −5 docs/tutorials/wiki2/src/models/tutorial/views.py
  57. +0 −3 docs/tutorials/wiki2/src/tests/README.txt
  58. +7 −1 docs/tutorials/wiki2/src/tests/development.ini
  59. +1 −0 docs/tutorials/wiki2/src/tests/production.ini
  60. +2 −1 docs/tutorials/wiki2/src/tests/setup.py
  61. +6 −19 docs/tutorials/wiki2/src/tests/tutorial/__init__.py
  62. +0 −37 docs/tutorials/wiki2/src/tests/tutorial/login.py
  63. +13 −24 docs/tutorials/wiki2/src/tests/tutorial/models.py
  64. +1 −0 docs/tutorials/wiki2/src/tests/tutorial/scripts/__init__.py
  65. +36 −0 docs/tutorials/wiki2/src/tests/tutorial/scripts/populate.py
  66. +0 −1 docs/tutorials/wiki2/src/tests/tutorial/security.py
  67. +33 −30 docs/tutorials/wiki2/src/tests/tutorial/tests.py
  68. +64 −12 docs/tutorials/wiki2/src/tests/tutorial/views.py
  69. +0 −3 docs/tutorials/wiki2/src/views/README.txt
  70. +7 −1 docs/tutorials/wiki2/src/views/development.ini
  71. +1 −0 docs/tutorials/wiki2/src/views/production.ini
  72. +2 −0 docs/tutorials/wiki2/src/views/setup.py
  73. +5 −12 docs/tutorials/wiki2/src/views/tutorial/__init__.py
  74. +9 −21 docs/tutorials/wiki2/src/views/tutorial/models.py
  75. +1 −0 docs/tutorials/wiki2/src/views/tutorial/scripts/__init__.py
  76. +35 −0 docs/tutorials/wiki2/src/views/tutorial/scripts/populate.py
  77. +1 −1 docs/tutorials/wiki2/src/views/tutorial/templates/mytemplate.pt
  78. +12 −5 docs/tutorials/wiki2/src/views/tutorial/tests.py
  79. +13 −4 docs/tutorials/wiki2/src/views/tutorial/views.py
  80. +2 −2 docs/tutorials/wiki2/tests.rst
  81. +4 −2 pyramid/asset.py
  82. +19 −13 pyramid/authentication.py
  83. +8 −5 pyramid/authorization.py
  84. +31 −12 pyramid/config/__init__.py
  85. +6 −4 pyramid/config/factories.py
  86. +5 −3 pyramid/config/i18n.py
  87. +11 −6 pyramid/config/rendering.py
  88. +10 −6 pyramid/config/routes.py
  89. +7 −5 pyramid/config/security.py
  90. +6 −4 pyramid/config/testing.py
  91. +12 −4 pyramid/config/tweens.py
  92. +11 −5 pyramid/config/util.py
  93. +52 −35 pyramid/config/views.py
  94. +7 −5 pyramid/encode.py
  95. +7 −5 pyramid/events.py
  96. +4 −2 pyramid/exceptions.py
  97. +7 −4 pyramid/httpexceptions.py
  98. +12 −7 pyramid/i18n.py
  99. +4 −2 pyramid/interfaces.py
  100. +14 −6 pyramid/mako_templating.py
  101. +48 −6 pyramid/paster.py
  102. +22 −11 pyramid/renderers.py
  103. +16 −9 pyramid/request.py
  104. +31 −20 pyramid/router.py
  105. +8 −5 pyramid/scaffolds/__init__.py
  106. +10 −6 pyramid/scaffolds/alchemy/+package+/models.py
  107. +35 −0 pyramid/scaffolds/alchemy/+package+/scripts/populate.py
  108. +0 −27 pyramid/scaffolds/alchemy/+package+/scripts/populate.py_tmpl
  109. +1 −1 pyramid/scaffolds/alchemy/+package+/tests.py_tmpl
  110. +5 −3 pyramid/scaffolds/alchemy/+package+/views.py_tmpl
  111. +6 −2 pyramid/scripting.py
  112. +2 −2 pyramid/scripts/pserve.py
  113. +2 −2 pyramid/scripts/pshell.py
  114. +6 −4 pyramid/security.py
  115. +8 −5 pyramid/session.py
  116. +23 −12 pyramid/static.py
  117. +38 −21 pyramid/testing.py
  118. +71 −9 pyramid/tests/test_paster.py
  119. +19 −14 pyramid/traversal.py
  120. +5 −2 pyramid/tweens.py
  121. +15 −8 pyramid/url.py
  122. +19 −11 pyramid/urldispatch.py
  123. +12 −7 pyramid/view.py
View
@@ -1,3 +0,0 @@
-[submodule "docs/_themes"]
- path = docs/_themes
- url = git://github.com/Pylons/pylons_sphinx_theme.git
View
@@ -17,6 +17,14 @@ Features
- ``bpython`` interpreter compatibility in ``pshell``. See the "Command-Line
Pyramid" narrative docs chapter for more information.
+- Added ``get_appsettings`` API function to the ``pyramid.paster`` module.
+ This function returns the settings defined within an ``[app:...]`` section
+ in a PasteDeploy ini file.
+
+- Added ``setup_logging`` API function to the ``pyramid.paster`` module.
+ This function sets up Python logging according to the logging configuration
+ in a PasteDeploy ini file.
+
Bug Fixes
---------
@@ -60,7 +68,7 @@ Backwards Incompatibilities
``paste.httpserver`` server. Rationale: Rationale: the Paste and
PasteScript packages do not run under Python 3.
-- The ``pshell`` command (nee "paster pshell") no longer accepts a
+- The ``pshell`` command (see "paster pshell") no longer accepts a
``--disable-ipython`` command-line argument. Instead, it accepts a ``-p``
or ``--python-shell`` argument, which can be any of the values ``python``,
``ipython`` or ``bpython``.
@@ -78,6 +86,13 @@ Dependencies
- Pyramid no longer depends on the Paste or PasteScript packages.
+Documentation
+-------------
+
+- The SQLAlchemy Wiki tutorial has been updated. It now uses
+ ``@view_config`` decorators and an explicit database population script.
+
+- Minor updates to the ZODB Wiki tutorial.
Scaffolds
---------
View
@@ -1,3 +1,4 @@
+_themes
_build
View
@@ -23,9 +23,9 @@ help:
@echo " linkcheck to check all external links for integrity"
clean:
- -rm -rf _build/* _themes
+ -rm -rf _build/*
-html: _themes
+html:
mkdir -p _build/html _build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@@ -47,7 +47,7 @@ pickle:
web: pickle
-htmlhelp: _themes
+htmlhelp:
mkdir -p _build/htmlhelp _build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
@@ -84,5 +84,3 @@ epub:
@echo
@echo "Build finished. The epub file is in _build/epub."
-_themes:
- cd ..; git submodule update --init; cd docs
Submodule _themes deleted from 03e5e5
View
@@ -5,13 +5,10 @@
.. automodule:: pyramid.paster
- .. function:: get_app(config_uri, name=None)
+ .. autofunction:: bootstrap
- Return the WSGI application named ``name`` in the PasteDeploy
- config file specified by ``config_uri``.
+ .. autofunction:: get_app(config_uri, name=None)
- If the ``name`` is None, this will attempt to parse the name from
- the ``config_uri`` string expecting the format ``inifile#name``.
- If no name is found, the name will default to "main".
+ .. autofunction:: get_appsettings(config_uri, name=None)
- .. autofunction:: bootstrap
+ .. autofunction:: setup_logging(config_uri)
View
@@ -141,14 +141,29 @@ def nothing(*arg):
# -----------------------
# Add and use Pylons theme
+from subprocess import call, Popen, PIPE
+
+p = Popen('which git', shell=True, stdout=PIPE)
+git = p.stdout.read().strip()
+cwd = os.getcwd()
+_themes = os.path.join(cwd, '_themes')
+
+if not os.path.isdir(_themes):
+ call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git',
+ '_themes'])
+else:
+ os.chdir(_themes)
+ call([git, 'checkout', 'master'])
+ call([git, 'pull'])
+ os.chdir(cwd)
+
sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'pyramid'
-
-html_theme_options = {
- 'github_url': 'https://github.com/Pylons/pyramid'
-}
-
+html_theme_options = dict(
+ github_url='https://github.com/Pylons/pyramid',
+ in_progress='true'
+ )
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
@@ -461,7 +476,7 @@ def resig(app, what, name, obj, options, signature, return_annotation):
# -- Options for Epub output ---------------------------------------------------
# Bibliographic Dublin Core info.
-epub_title = 'The Pyramid Web Application Development Framework, Version 1.2'
+epub_title = 'The Pyramid Web Application Development Framework, Version 1.3dev'
epub_author = 'Chris McDonough'
epub_publisher = 'Agendaless Consulting'
epub_copyright = '2008-2011'
@@ -478,7 +493,7 @@ def resig(app, what, name, obj, options, signature, return_annotation):
epub_identifier = '0615445675'
# A unique identification for the text.
-epub_uid = 'The Pyramid Web Application Development Framework, Version 1.2'
+epub_uid = 'The Pyramid Web Application Development Framework, Version 1.3dev'
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
View
@@ -936,3 +936,8 @@ Glossary
email. See its `documentation
<https://docs.pylonsproject.org/projects/pyramid_exclog/dev/>`_.
+ console script
+ A script written to the ``bin`` (on UNIX, or ``Scripts`` on Windows)
+ directory of a Python installation or virtualenv as the result of
+ running ``setup.py install`` or ``setup.py develop``.
+
@@ -23,27 +23,28 @@ h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
-body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
+body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "NobileRegular","Lucida Grande",Lucida,Verdana,sans-serif;}
a{color:#1b61d6;text-decoration:none;}
a:hover{color:#e88f00;text-decoration:underline;}
body h1,
body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+body h6{font-family:"NeutonRegular","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
#wrap{min-height:100%;}
#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
#header{background:#000000;top:0;font-size:14px;}
#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#000000;height:230px;
-background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top,#top-small,#bottom{width:100%;}
+#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
#bottom{color:#222;background-color:#ffffff;}
-.top,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
.top{padding-top:40px;}
+.top-small{padding-top:10px;}
#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
@@ -58,7 +59,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{width:205px;}
+input[type=text],input[type=password]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
@@ -1,42 +1,29 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xml:lang="en"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
<title>The Pyramid Web Application Development Framework</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
- <link rel="shortcut icon"
- href="${request.static_url('myproject:static/favicon.ico')}" />
- <link rel="stylesheet"
- href="${request.static_url('myproject:static/pylons.css')}"
- type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet"
- href="http://fonts.googleapis.com/css?family=Neuton|Nobile:regular,i,b,bi&amp;subset=latin"
- type="text/css" media="screen" charset="utf-8" />
+ <link rel="shortcut icon" href="/static/favicon.ico" />
+ <link rel="stylesheet" href="/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="http://static.pylonsproject.org/fonts/nobile/stylesheet.css" media="screen" />
+ <link rel="stylesheet" href="http://static.pylonsproject.org/fonts/neuton/stylesheet.css" media="screen" />
<!--[if lte IE 6]>
- <link rel="stylesheet"
- href="${request.static_url('myproject:static/ie6.css')}"
- type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="/static/ie6.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div id="wrap">
<div id="top">
<div class="top align-center">
- <div>
- <img src="${request.static_url('myproject:static/pyramid.png')}"
- width="750" height="169" alt="pyramid"/>
- </div>
+ <div><img src="/static/pyramid.png" width="750" height="169" alt="pyramid"/></div>
</div>
</div>
<div id="middle">
<div class="middle align-center">
<p class="app-welcome">
- Welcome to <span class="app-name">${project}</span>,
- an application generated by<br/>
+ Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
the Pyramid web application development framework.
</p>
</div>
@@ -45,62 +32,45 @@
<div class="bottom">
<div id="left" class="align-right">
<h2>Search documentation</h2>
- <form method="get"
- action="http://docs.pylonsproject.org/pyramid/current/search.html">
- <input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Go" />
- </form>
+ <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/current/search.html">
+ <input type="text" id="q" name="q" value="" />
+ <input type="submit" id="x" value="Go" />
+ </form>
</div>
<div id="right" class="align-left">
<h2>Pyramid links</h2>
<ul class="links">
<li>
- <a href="http://pylonsproject.org">
- Pylons Website
- </a>
+ <a href="http://pylonsproject.org">Pylons Website</a>
</li>
<li>
- <a href="http://docs.pylonsproject.org/projects/pyramid/current/#narrative-documentation">
- Narrative Documentation
- </a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/current/#narrative-documentation">Narrative Documentation</a>
</li>
<li>
- <a href="http://docs.pylonsproject.org/projects/pyramid/current/#api-documentation">
- API Documentation
- </a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/current/#api-documentation">API Documentation</a>
</li>
<li>
- <a href="http://docs.pylonsproject.org/projects/pyramid/current/#tutorials">
- Tutorials
- </a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/current/#tutorials">Tutorials</a>
</li>
<li>
- <a href="http://docs.pylonsproject.org/projects/pyramid/current/#change-history">
- Change History
- </a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/current/#change-history">Change History</a>
</li>
<li>
- <a href="http://docs.pylonsproject.org/projects/pyramid/current/#sample-applications">
- Sample Applications
- </a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/current/#sample-applications">Sample Applications</a>
</li>
<li>
- <a href="http://docs.pylonsproject.org/projects/pyramid/current/#support-and-development">
- Support and Development
- </a>
+ <a href="http://docs.pylonsproject.org/projects/pyramid/current/#support-and-development">Support and Development</a>
</li>
<li>
- <a href="irc://irc.freenode.net#pyramid">
- IRC Channel
- </a>
+ <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
</li>
- </ul>
+ </ul>
</div>
</div>
</div>
</div>
<div id="footer">
- <div class="footer">&copy; Copyright 2008-2010, Agendaless Consulting.</div>
+ <div class="footer">&copy; Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html>
Oops, something went wrong.

0 comments on commit dafb0b3

Please sign in to comment.