diff options
Diffstat (limited to 'docs/quick_tutorial/jinja2')
| -rw-r--r-- | docs/quick_tutorial/jinja2/development.ini | 36 | ||||
| -rw-r--r-- | docs/quick_tutorial/jinja2/setup.py | 33 | ||||
| -rw-r--r-- | docs/quick_tutorial/jinja2/tutorial/home.jinja2 | 4 | ||||
| -rw-r--r-- | docs/quick_tutorial/jinja2/tutorial/tests.py | 8 |
4 files changed, 31 insertions, 50 deletions
diff --git a/docs/quick_tutorial/jinja2/development.ini b/docs/quick_tutorial/jinja2/development.ini index 62e0c5123..78d7479e7 100644 --- a/docs/quick_tutorial/jinja2/development.ini +++ b/docs/quick_tutorial/jinja2/development.ini @@ -5,37 +5,5 @@ pyramid.includes = pyramid_debugtoolbar [server:main] -use = egg:pyramid#wsgiref -host = 0.0.0.0 -port = 6543 - -# Begin logging configuration - -[loggers] -keys = root, tutorial - -[logger_tutorial] -level = DEBUG -handlers = -qualname = tutorial - -[handlers] -keys = console - -[formatters] -keys = generic - -[logger_root] -level = INFO -handlers = console - -[handler_console] -class = StreamHandler -args = (sys.stderr,) -level = NOTSET -formatter = generic - -[formatter_generic] -format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s - -# End logging configuration +use = egg:waitress#main +listen = localhost:6543 diff --git a/docs/quick_tutorial/jinja2/setup.py b/docs/quick_tutorial/jinja2/setup.py index 9997984d3..ea2c59045 100644 --- a/docs/quick_tutorial/jinja2/setup.py +++ b/docs/quick_tutorial/jinja2/setup.py @@ -1,13 +1,32 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .` +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', + 'pyramid_chameleon', + 'pyramid_jinja2', + 'waitress', ] -setup(name='tutorial', - install_requires=requires, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, -)
\ No newline at end of file +# List of dependencies installed via `pip install -e ".[dev]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +dev_requires = [ + 'pyramid_debugtoolbar', + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'dev': dev_requires, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/jinja2/tutorial/home.jinja2 b/docs/quick_tutorial/jinja2/tutorial/home.jinja2 index 975323169..20d33b733 100644 --- a/docs/quick_tutorial/jinja2/tutorial/home.jinja2 +++ b/docs/quick_tutorial/jinja2/tutorial/home.jinja2 @@ -1,9 +1,9 @@ <!DOCTYPE html> <html lang="en"> <head> - <title>Quick Tour: {{ name }}</title> + <title>Quick Tutorial: {{ name }}</title> </head> <body> <h1>Hi {{ name }}</h1> </body> -</html>
\ No newline at end of file +</html> diff --git a/docs/quick_tutorial/jinja2/tutorial/tests.py b/docs/quick_tutorial/jinja2/tutorial/tests.py index 0b22946f3..4381235ec 100644 --- a/docs/quick_tutorial/jinja2/tutorial/tests.py +++ b/docs/quick_tutorial/jinja2/tutorial/tests.py @@ -30,13 +30,7 @@ class TutorialViewTests(unittest.TestCase): class TutorialFunctionalTests(unittest.TestCase): def setUp(self): from tutorial import main - - settings = { - 'pyramid.includes': [ - 'pyramid_jinja2' - ] - } - app = main({}, **settings) + app = main({}) from webtest import TestApp self.testapp = TestApp(app) |
