summaryrefslogtreecommitdiff
path: root/docs/getting_started/quick_glance
diff options
context:
space:
mode:
authorPaul Everitt <paul@agendaless.com>2013-08-09 11:37:48 -0400
committerPaul Everitt <paul@agendaless.com>2013-08-09 11:37:48 -0400
commitd4bd291fd5ca51bbbeec487f2011476706a5952f (patch)
tree77052c5204e0045f59b740ff9d1ae253394524da /docs/getting_started/quick_glance
parent65d1719fc5ce4ed4e87c45b1e4279c30930b274e (diff)
downloadpyramid-d4bd291fd5ca51bbbeec487f2011476706a5952f.tar.gz
pyramid-d4bd291fd5ca51bbbeec487f2011476706a5952f.tar.bz2
pyramid-d4bd291fd5ca51bbbeec487f2011476706a5952f.zip
Lots of updates, move more code out of code-blocks into working package code. About to tackle cool Pyramid stuff.
Diffstat (limited to 'docs/getting_started/quick_glance')
-rw-r--r--docs/getting_started/quick_glance/hello_sqlalchemy/MANIFEST.in2
-rw-r--r--docs/getting_started/quick_glance/hello_sqlalchemy/setup.cfg27
-rw-r--r--docs/getting_started/quick_glance/package/development.ini13
-rw-r--r--docs/getting_started/quick_glance/package/hello_world/__init__.py13
-rw-r--r--docs/getting_started/quick_glance/package/hello_world/templates/mytemplate.jinja25
-rw-r--r--docs/getting_started/quick_glance/package/hello_world/tests.py1
-rw-r--r--docs/getting_started/quick_glance/package/hello_world/views.py18
-rw-r--r--docs/getting_started/quick_glance/package/setup.py2
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/CHANGES.txt (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/CHANGES.txt)0
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/MANIFEST.in2
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/README.txt (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/README.txt)4
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/development.ini (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/development.ini)10
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/production.ini (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/production.ini)10
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/setup.cfg27
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/setup.py (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/setup.py)10
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo.sqlite (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy.sqlite)bin3072 -> 3072 bytes
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/__init__.py (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/__init__.py)0
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/models.py (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/models.py)3
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/__init__.py (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/scripts/__init__.py)0
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/initializedb.py (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/scripts/initializedb.py)0
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/favicon.ico (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/favicon.ico)bin1406 -> 1406 bytes
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/footerbg.png (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/footerbg.png)bin333 -> 333 bytes
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/headerbg.png (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/headerbg.png)bin203 -> 203 bytes
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/ie6.css (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/ie6.css)0
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/middlebg.png (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/middlebg.png)bin2797 -> 2797 bytes
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pylons.css (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pylons.css)0
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid-small.png (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pyramid-small.png)bin7044 -> 7044 bytes
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid.png (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pyramid.png)bin33055 -> 33055 bytes
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/transparent.gif (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/transparent.gif)bin49 -> 49 bytes
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/templates/mytemplate.pt (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/templates/mytemplate.pt)12
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/tests.py (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/tests.py)2
-rw-r--r--docs/getting_started/quick_glance/sqla_demo/sqla_demo/views.py (renamed from docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/views.py)15
32 files changed, 103 insertions, 73 deletions
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/MANIFEST.in b/docs/getting_started/quick_glance/hello_sqlalchemy/MANIFEST.in
deleted file mode 100644
index 2a06ba607..000000000
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/MANIFEST.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include *.txt *.ini *.cfg *.rst
-recursive-include hello_sqlalchemy *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/setup.cfg b/docs/getting_started/quick_glance/hello_sqlalchemy/setup.cfg
deleted file mode 100644
index d08bf9c9b..000000000
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/setup.cfg
+++ /dev/null
@@ -1,27 +0,0 @@
-[nosetests]
-match=^test
-nocapture=1
-cover-package=hello_sqlalchemy
-with-coverage=1
-cover-erase=1
-
-[compile_catalog]
-directory = hello_sqlalchemy/locale
-domain = hello_sqlalchemy
-statistics = true
-
-[extract_messages]
-add_comments = TRANSLATORS:
-output_file = hello_sqlalchemy/locale/hello_sqlalchemy.pot
-width = 80
-
-[init_catalog]
-domain = hello_sqlalchemy
-input_file = hello_sqlalchemy/locale/hello_sqlalchemy.pot
-output_dir = hello_sqlalchemy/locale
-
-[update_catalog]
-domain = hello_sqlalchemy
-input_file = hello_sqlalchemy/locale/hello_sqlalchemy.pot
-output_dir = hello_sqlalchemy/locale
-previous = true
diff --git a/docs/getting_started/quick_glance/package/development.ini b/docs/getting_started/quick_glance/package/development.ini
index 9aa5f40cf..a751ff903 100644
--- a/docs/getting_started/quick_glance/package/development.ini
+++ b/docs/getting_started/quick_glance/package/development.ini
@@ -1,5 +1,7 @@
+# Start Includes
[app:hello_world]
pyramid.includes = pyramid_debugtoolbar
+# End Includes
use = egg:hello_world
reload_templates = true
debug_authorization = false
@@ -22,9 +24,16 @@ port = 6543
# Begin logging configuration
+# Start Sphinx Include
[loggers]
keys = root, hello_world
+[logger_hello_world]
+level = DEBUG
+handlers =
+qualname = hello_world
+# End Sphinx Include
+
[handlers]
keys = console
@@ -35,10 +44,6 @@ keys = generic
level = INFO
handlers = console
-[logger_hello_world]
-level = DEBUG
-handlers =
-qualname = hello_world
[handler_console]
class = StreamHandler
diff --git a/docs/getting_started/quick_glance/package/hello_world/__init__.py b/docs/getting_started/quick_glance/package/hello_world/__init__.py
index 9b5753c26..6e66bf40a 100644
--- a/docs/getting_started/quick_glance/package/hello_world/__init__.py
+++ b/docs/getting_started/quick_glance/package/hello_world/__init__.py
@@ -1,5 +1,9 @@
from pyramid.config import Configurator
from pyramid_jinja2 import renderer_factory
+# Start Sphinx Include 1
+from pyramid.session import UnencryptedCookieSessionFactoryConfig
+# End Sphinx Include 1
+
from hello_world.models import get_root
def main(global_config, **settings):
@@ -11,9 +15,16 @@ def main(global_config, **settings):
settings = dict(settings)
settings.setdefault('jinja2.i18n.domain', 'hello_world')
- config = Configurator(root_factory=get_root, settings=settings)
+ # Start Sphinx Include 2
+ my_session_factory = UnencryptedCookieSessionFactoryConfig('itsaseekreet')
+ config = Configurator(root_factory=get_root, settings=settings,
+ session_factory=my_session_factory)
+ # End Sphinx Include 2
config.add_translation_dirs('locale/')
+ # Start Include
config.include('pyramid_jinja2')
+ # End Include
+
config.add_static_view('static', 'static')
config.add_view('hello_world.views.my_view',
diff --git a/docs/getting_started/quick_glance/package/hello_world/templates/mytemplate.jinja2 b/docs/getting_started/quick_glance/package/hello_world/templates/mytemplate.jinja2
index 998edfe12..25a28ed7a 100644
--- a/docs/getting_started/quick_glance/package/hello_world/templates/mytemplate.jinja2
+++ b/docs/getting_started/quick_glance/package/hello_world/templates/mytemplate.jinja2
@@ -35,7 +35,10 @@
<div id="bottom">
<div class="locale">
<h2>{% trans %}Hello!{% endtrans %}</h2>
- <p>Request performed with <span class="locale-name">{{ request.locale_name }}</span> locale.</p>
+ <!-- Start Sphinx Include 1 -->
+ <p>Counter: {{ request.session.counter }}</p>
+ <!-- End Sphinx Include 1 -->
+ <p>Request performed with <span class="locale-name">{{ request.locale_name }}</span> locale.</p>
</div>
<div class="bottom">
<div id="left" class="align-right">
diff --git a/docs/getting_started/quick_glance/package/hello_world/tests.py b/docs/getting_started/quick_glance/package/hello_world/tests.py
index a81c29eb0..ccec14f70 100644
--- a/docs/getting_started/quick_glance/package/hello_world/tests.py
+++ b/docs/getting_started/quick_glance/package/hello_world/tests.py
@@ -18,4 +18,3 @@ class ViewTests(unittest.TestCase):
request = testing.DummyRequest()
response = my_view(request)
self.assertEqual(response['project'], 'hello_world')
-
diff --git a/docs/getting_started/quick_glance/package/hello_world/views.py b/docs/getting_started/quick_glance/package/hello_world/views.py
index c271d45dd..109c260ad 100644
--- a/docs/getting_started/quick_glance/package/hello_world/views.py
+++ b/docs/getting_started/quick_glance/package/hello_world/views.py
@@ -1,6 +1,22 @@
+# Start Logging 1
+import logging
+log = logging.getLogger(__name__)
+# End Logging 1
+
from pyramid.i18n import TranslationStringFactory
_ = TranslationStringFactory('hello_world')
+
def my_view(request):
- return {'project':'hello_world'}
+ # Start Logging 2
+ log.debug('Some Message')
+ # End Logging 2
+ # Start Sphinx Include 1
+ session = request.session
+ if 'counter' in session:
+ session['counter'] += 1
+ else:
+ session['counter'] = 0
+ # End Sphinx Include 1
+ return {'project': 'hello_world'}
diff --git a/docs/getting_started/quick_glance/package/setup.py b/docs/getting_started/quick_glance/package/setup.py
index 6269accf1..f118ed5fb 100644
--- a/docs/getting_started/quick_glance/package/setup.py
+++ b/docs/getting_started/quick_glance/package/setup.py
@@ -6,7 +6,9 @@ here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
+# Start Requires
requires = ['pyramid>=1.0.2', 'pyramid_jinja2', 'pyramid_debugtoolbar']
+# End Requires
setup(name='hello_world',
version='0.0',
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/CHANGES.txt b/docs/getting_started/quick_glance/sqla_demo/CHANGES.txt
index 35a34f332..35a34f332 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/CHANGES.txt
+++ b/docs/getting_started/quick_glance/sqla_demo/CHANGES.txt
diff --git a/docs/getting_started/quick_glance/sqla_demo/MANIFEST.in b/docs/getting_started/quick_glance/sqla_demo/MANIFEST.in
new file mode 100644
index 000000000..a432577e9
--- /dev/null
+++ b/docs/getting_started/quick_glance/sqla_demo/MANIFEST.in
@@ -0,0 +1,2 @@
+include *.txt *.ini *.cfg *.rst
+recursive-include sqla_demo *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/README.txt b/docs/getting_started/quick_glance/sqla_demo/README.txt
index b7a6612a0..f35d3aec5 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/README.txt
+++ b/docs/getting_started/quick_glance/sqla_demo/README.txt
@@ -1,4 +1,4 @@
-hello_sqlalchemy README
+sqla_demo README
==================
Getting Started
@@ -8,7 +8,7 @@ Getting Started
- $venv/bin/python setup.py develop
-- $venv/bin/initialize_hello_sqlalchemy_db development.ini
+- $venv/bin/initialize_sqla_demo_db development.ini
- $venv/bin/pserve development.ini
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/development.ini b/docs/getting_started/quick_glance/sqla_demo/development.ini
index 59ae96568..174468abf 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/development.ini
+++ b/docs/getting_started/quick_glance/sqla_demo/development.ini
@@ -4,7 +4,7 @@
###
[app:main]
-use = egg:hello_sqlalchemy
+use = egg:sqla_demo
pyramid.reload_templates = true
pyramid.debug_authorization = false
@@ -15,7 +15,7 @@ pyramid.includes =
pyramid_debugtoolbar
pyramid_tm
-sqlalchemy.url = sqlite:///%(here)s/hello_sqlalchemy.sqlite
+sqlalchemy.url = sqlite:///%(here)s/sqla_demo.sqlite
# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
@@ -36,7 +36,7 @@ port = 6543
###
[loggers]
-keys = root, hello_sqlalchemy, sqlalchemy
+keys = root, sqla_demo, sqlalchemy
[handlers]
keys = console
@@ -48,10 +48,10 @@ keys = generic
level = INFO
handlers = console
-[logger_hello_sqlalchemy]
+[logger_sqla_demo]
level = DEBUG
handlers =
-qualname = hello_sqlalchemy
+qualname = sqla_demo
[logger_sqlalchemy]
level = INFO
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/production.ini b/docs/getting_started/quick_glance/sqla_demo/production.ini
index 3257d0067..dc0ba304f 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/production.ini
+++ b/docs/getting_started/quick_glance/sqla_demo/production.ini
@@ -4,7 +4,7 @@
###
[app:main]
-use = egg:hello_sqlalchemy
+use = egg:sqla_demo
pyramid.reload_templates = false
pyramid.debug_authorization = false
@@ -14,7 +14,7 @@ pyramid.default_locale_name = en
pyramid.includes =
pyramid_tm
-sqlalchemy.url = sqlite:///%(here)s/hello_sqlalchemy.sqlite
+sqlalchemy.url = sqlite:///%(here)s/sqla_demo.sqlite
[server:main]
use = egg:waitress#main
@@ -27,7 +27,7 @@ port = 6543
###
[loggers]
-keys = root, hello_sqlalchemy, sqlalchemy
+keys = root, sqla_demo, sqlalchemy
[handlers]
keys = console
@@ -39,10 +39,10 @@ keys = generic
level = WARN
handlers = console
-[logger_hello_sqlalchemy]
+[logger_sqla_demo]
level = WARN
handlers =
-qualname = hello_sqlalchemy
+qualname = sqla_demo
[logger_sqlalchemy]
level = WARN
diff --git a/docs/getting_started/quick_glance/sqla_demo/setup.cfg b/docs/getting_started/quick_glance/sqla_demo/setup.cfg
new file mode 100644
index 000000000..9f91cd122
--- /dev/null
+++ b/docs/getting_started/quick_glance/sqla_demo/setup.cfg
@@ -0,0 +1,27 @@
+[nosetests]
+match=^test
+nocapture=1
+cover-package=sqla_demo
+with-coverage=1
+cover-erase=1
+
+[compile_catalog]
+directory = sqla_demo/locale
+domain = sqla_demo
+statistics = true
+
+[extract_messages]
+add_comments = TRANSLATORS:
+output_file = sqla_demo/locale/sqla_demo.pot
+width = 80
+
+[init_catalog]
+domain = sqla_demo
+input_file = sqla_demo/locale/sqla_demo.pot
+output_dir = sqla_demo/locale
+
+[update_catalog]
+domain = sqla_demo
+input_file = sqla_demo/locale/sqla_demo.pot
+output_dir = sqla_demo/locale
+previous = true
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/setup.py b/docs/getting_started/quick_glance/sqla_demo/setup.py
index f4e1f48c0..ac2eed035 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/setup.py
+++ b/docs/getting_started/quick_glance/sqla_demo/setup.py
@@ -16,9 +16,9 @@ requires = [
'waitress',
]
-setup(name='hello_sqlalchemy',
+setup(name='sqla_demo',
version='0.0',
- description='hello_sqlalchemy',
+ description='sqla_demo',
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Programming Language :: Python",
@@ -33,12 +33,12 @@ setup(name='hello_sqlalchemy',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
- test_suite='hello_sqlalchemy',
+ test_suite='sqla_demo',
install_requires=requires,
entry_points="""\
[paste.app_factory]
- main = hello_sqlalchemy:main
+ main = sqla_demo:main
[console_scripts]
- initialize_hello_sqlalchemy_db = hello_sqlalchemy.scripts.initializedb:main
+ initialize_sqla_demo_db = sqla_demo.scripts.initializedb:main
""",
)
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy.sqlite b/docs/getting_started/quick_glance/sqla_demo/sqla_demo.sqlite
index fa6adb104..fa6adb104 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy.sqlite
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo.sqlite
Binary files differ
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/__init__.py b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/__init__.py
index aac7c5e69..aac7c5e69 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/__init__.py
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/__init__.py
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/models.py b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/models.py
index aeeb9df64..3dfb40e58 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/models.py
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/models.py
@@ -16,7 +16,7 @@ from zope.sqlalchemy import ZopeTransactionExtension
DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
Base = declarative_base()
-
+# Start Sphinx Include
class MyModel(Base):
__tablename__ = 'models'
id = Column(Integer, primary_key=True)
@@ -26,3 +26,4 @@ class MyModel(Base):
def __init__(self, name, value):
self.name = name
self.value = value
+ # End Sphinx Include
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/scripts/__init__.py b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/__init__.py
index 5bb534f79..5bb534f79 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/scripts/__init__.py
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/__init__.py
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/scripts/initializedb.py b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/initializedb.py
index 66feb3008..66feb3008 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/scripts/initializedb.py
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/scripts/initializedb.py
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/favicon.ico b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/favicon.ico
index 71f837c9e..71f837c9e 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/favicon.ico
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/favicon.ico
Binary files differ
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/footerbg.png b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/footerbg.png
index 1fbc873da..1fbc873da 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/footerbg.png
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/footerbg.png
Binary files differ
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/headerbg.png b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/headerbg.png
index 0596f2020..0596f2020 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/headerbg.png
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/headerbg.png
Binary files differ
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/ie6.css b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/ie6.css
index b7c8493d8..b7c8493d8 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/ie6.css
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/ie6.css
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/middlebg.png b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/middlebg.png
index 2369cfb7d..2369cfb7d 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/middlebg.png
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/middlebg.png
Binary files differ
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pylons.css b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pylons.css
index 4b1c017cd..4b1c017cd 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pylons.css
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pylons.css
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pyramid-small.png b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid-small.png
index a5bc0ade7..a5bc0ade7 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pyramid-small.png
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid-small.png
Binary files differ
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pyramid.png b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid.png
index 347e05549..347e05549 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/pyramid.png
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/pyramid.png
Binary files differ
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/transparent.gif b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/transparent.gif
index 0341802e5..0341802e5 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/static/transparent.gif
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/static/transparent.gif
Binary files differ
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/templates/mytemplate.pt b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/templates/mytemplate.pt
index 2de66d4c9..e0ac9d440 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/templates/mytemplate.pt
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/templates/mytemplate.pt
@@ -1,30 +1,30 @@
<!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 Framework</title>
+ <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('hello_sqlalchemy:static/favicon.ico')}" />
- <link rel="stylesheet" href="${request.static_url('hello_sqlalchemy:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="shortcut icon" href="${request.static_url('sqla_demo:static/favicon.ico')}" />
+ <link rel="stylesheet" href="${request.static_url('sqla_demo: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('hello_sqlalchemy:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="${request.static_url('sqla_demo: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('hello_sqlalchemy:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
+ <div><img src="${request.static_url('sqla_demo: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/>
- the Pyramid Web Framework.
+ the Pyramid web application development framework.
</p>
</div>
</div>
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/tests.py b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/tests.py
index e2789665b..6fef6d695 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/tests.py
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/tests.py
@@ -30,4 +30,4 @@ class TestMyView(unittest.TestCase):
request = testing.DummyRequest()
info = my_view(request)
self.assertEqual(info['one'].name, 'one')
- self.assertEqual(info['project'], 'hello_sqlalchemy')
+ self.assertEqual(info['project'], 'sqla_demo')
diff --git a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/views.py b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/views.py
index 796acf738..768a7e42e 100644
--- a/docs/getting_started/quick_glance/hello_sqlalchemy/hello_sqlalchemy/views.py
+++ b/docs/getting_started/quick_glance/sqla_demo/sqla_demo/views.py
@@ -1,9 +1,6 @@
from pyramid.response import Response
from pyramid.view import view_config
-import colander
-import deform
-
from sqlalchemy.exc import DBAPIError
from .models import (
@@ -11,26 +8,22 @@ from .models import (
MyModel,
)
-class MyForm(colander.MappingSchema):
- title = colander.SchemaNode(colander.String())
- body = colander.SchemaNode(
- colander.String(),
- widget=deform.widget.RichTextWidget()
- )
@view_config(route_name='home', renderer='templates/mytemplate.pt')
def my_view(request):
try:
+ # Start Sphinx Include
one = DBSession.query(MyModel).filter(MyModel.name == 'one').first()
+ # End Sphinx Include
except DBAPIError:
return Response(conn_err_msg, content_type='text/plain', status_int=500)
- return {'one': one, 'project': 'hello_sqlalchemy'}
+ return {'one': one, 'project': 'sqla_demo'}
conn_err_msg = """\
Pyramid is having a problem using your SQL database. The problem
might be caused by one of the following things:
-1. You may need to run the "initialize_hello_sqlalchemy_db" script
+1. You may need to run the "initialize_sqla_demo_db" script
to initialize your database tables. Check your virtual
environment's "bin" directory for this script and try to run it.