From 1bf417e4c1b2865f44357a61ca16fadde310077e Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 6 Dec 2016 10:43:22 +0100 Subject: Changed 'host' and 'port' configuration to a new 'listen' style that is now supported by waitress server. --- docs/tutorials/wiki2/src/authentication/development.ini | 3 +-- docs/tutorials/wiki2/src/authentication/production.ini | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/development.ini b/docs/tutorials/wiki2/src/authentication/development.ini index 4a6c9325c..89ee6388b 100644 --- a/docs/tutorials/wiki2/src/authentication/development.ini +++ b/docs/tutorials/wiki2/src/authentication/development.ini @@ -29,8 +29,7 @@ auth.secret = seekrit [server:main] use = egg:waitress#main -host = 127.0.0.1 -port = 6543 +list = 127.0.0.1:6543 ### # logging configuration diff --git a/docs/tutorials/wiki2/src/authentication/production.ini b/docs/tutorials/wiki2/src/authentication/production.ini index a13a0ca19..4a5023c67 100644 --- a/docs/tutorials/wiki2/src/authentication/production.ini +++ b/docs/tutorials/wiki2/src/authentication/production.ini @@ -18,8 +18,7 @@ auth.secret = real-seekrit [server:main] use = egg:waitress#main -host = 0.0.0.0 -port = 6543 +list = 0.0.0.0:6543 ### # logging configuration -- cgit v1.2.3 From 988c1f789faf9662abead1e1be40969be37867a8 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 6 Dec 2016 16:00:56 -0800 Subject: =?UTF-8?q?Revert=20"Changed=20'host'=20and=20'port'=20configurati?= =?UTF-8?q?on=20to=20a=20new=20'listen'=20style=20that=20=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/tutorials/wiki2/src/authentication/development.ini | 3 ++- docs/tutorials/wiki2/src/authentication/production.ini | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/development.ini b/docs/tutorials/wiki2/src/authentication/development.ini index 89ee6388b..4a6c9325c 100644 --- a/docs/tutorials/wiki2/src/authentication/development.ini +++ b/docs/tutorials/wiki2/src/authentication/development.ini @@ -29,7 +29,8 @@ auth.secret = seekrit [server:main] use = egg:waitress#main -list = 127.0.0.1:6543 +host = 127.0.0.1 +port = 6543 ### # logging configuration diff --git a/docs/tutorials/wiki2/src/authentication/production.ini b/docs/tutorials/wiki2/src/authentication/production.ini index 4a5023c67..a13a0ca19 100644 --- a/docs/tutorials/wiki2/src/authentication/production.ini +++ b/docs/tutorials/wiki2/src/authentication/production.ini @@ -18,7 +18,8 @@ auth.secret = real-seekrit [server:main] use = egg:waitress#main -list = 0.0.0.0:6543 +host = 0.0.0.0 +port = 6543 ### # logging configuration -- cgit v1.2.3 From 07e802fa7d6a63a69b31514923f85d6e76dd33e8 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 6 Dec 2016 10:43:22 +0100 Subject: Changed 'host' and 'port' configuration to a new 'listen' style that is now supported by waitress server. --- docs/tutorials/wiki2/src/authentication/development.ini | 3 +-- docs/tutorials/wiki2/src/authentication/production.ini | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/development.ini b/docs/tutorials/wiki2/src/authentication/development.ini index 4a6c9325c..89ee6388b 100644 --- a/docs/tutorials/wiki2/src/authentication/development.ini +++ b/docs/tutorials/wiki2/src/authentication/development.ini @@ -29,8 +29,7 @@ auth.secret = seekrit [server:main] use = egg:waitress#main -host = 127.0.0.1 -port = 6543 +list = 127.0.0.1:6543 ### # logging configuration diff --git a/docs/tutorials/wiki2/src/authentication/production.ini b/docs/tutorials/wiki2/src/authentication/production.ini index a13a0ca19..4a5023c67 100644 --- a/docs/tutorials/wiki2/src/authentication/production.ini +++ b/docs/tutorials/wiki2/src/authentication/production.ini @@ -18,8 +18,7 @@ auth.secret = real-seekrit [server:main] use = egg:waitress#main -host = 0.0.0.0 -port = 6543 +list = 0.0.0.0:6543 ### # logging configuration -- cgit v1.2.3 From 3588e811df0efe16642fee427a2988af9f4e4b6e Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 7 Dec 2016 10:39:41 +0100 Subject: fixed 'list' to 'listen' --- docs/tutorials/wiki2/src/authentication/development.ini | 2 +- docs/tutorials/wiki2/src/authentication/production.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/development.ini b/docs/tutorials/wiki2/src/authentication/development.ini index 89ee6388b..62a7edd48 100644 --- a/docs/tutorials/wiki2/src/authentication/development.ini +++ b/docs/tutorials/wiki2/src/authentication/development.ini @@ -29,7 +29,7 @@ auth.secret = seekrit [server:main] use = egg:waitress#main -list = 127.0.0.1:6543 +listen = 127.0.0.1:6543 ### # logging configuration diff --git a/docs/tutorials/wiki2/src/authentication/production.ini b/docs/tutorials/wiki2/src/authentication/production.ini index 4a5023c67..ac9672654 100644 --- a/docs/tutorials/wiki2/src/authentication/production.ini +++ b/docs/tutorials/wiki2/src/authentication/production.ini @@ -18,7 +18,7 @@ auth.secret = real-seekrit [server:main] use = egg:waitress#main -list = 0.0.0.0:6543 +listen = 0.0.0.0:6543 ### # logging configuration -- cgit v1.2.3 From fb17a37442224961e4bd3d797945d130221acfb9 Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 9 Dec 2016 12:46:33 +0100 Subject: Added configuration for ipv6 in .ini files. --- docs/tutorials/wiki2/src/authentication/development.ini | 2 +- docs/tutorials/wiki2/src/authentication/production.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/development.ini b/docs/tutorials/wiki2/src/authentication/development.ini index 62a7edd48..a767a0e6f 100644 --- a/docs/tutorials/wiki2/src/authentication/development.ini +++ b/docs/tutorials/wiki2/src/authentication/development.ini @@ -29,7 +29,7 @@ auth.secret = seekrit [server:main] use = egg:waitress#main -listen = 127.0.0.1:6543 +listen = 127.0.0.1:6543 [::1]:6543 ### # logging configuration diff --git a/docs/tutorials/wiki2/src/authentication/production.ini b/docs/tutorials/wiki2/src/authentication/production.ini index ac9672654..f27dc09d4 100644 --- a/docs/tutorials/wiki2/src/authentication/production.ini +++ b/docs/tutorials/wiki2/src/authentication/production.ini @@ -18,7 +18,7 @@ auth.secret = real-seekrit [server:main] use = egg:waitress#main -listen = 0.0.0.0:6543 +listen = *:6543 ### # logging configuration -- cgit v1.2.3 From 4eb7f0b3ceee763d673535ae3365843096ebbc8a Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 23 Dec 2016 17:59:54 -0800 Subject: wiki2/src/authentication update files --- .../tutorials/wiki2/src/authentication/.coveragerc | 3 + .../tutorials/wiki2/src/authentication/CHANGES.txt | 2 +- .../tutorials/wiki2/src/authentication/MANIFEST.in | 2 +- docs/tutorials/wiki2/src/authentication/README.txt | 31 +++++++++-- .../wiki2/src/authentication/development.ini | 5 +- .../wiki2/src/authentication/production.ini | 8 ++- docs/tutorials/wiki2/src/authentication/pytest.ini | 3 + docs/tutorials/wiki2/src/authentication/setup.py | 65 +++++++++++----------- 8 files changed, 75 insertions(+), 44 deletions(-) create mode 100644 docs/tutorials/wiki2/src/authentication/.coveragerc create mode 100644 docs/tutorials/wiki2/src/authentication/pytest.ini (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/.coveragerc b/docs/tutorials/wiki2/src/authentication/.coveragerc new file mode 100644 index 000000000..a1d87d03d --- /dev/null +++ b/docs/tutorials/wiki2/src/authentication/.coveragerc @@ -0,0 +1,3 @@ +[run] +source = tutorial +omit = tutorial/test* diff --git a/docs/tutorials/wiki2/src/authentication/CHANGES.txt b/docs/tutorials/wiki2/src/authentication/CHANGES.txt index 35a34f332..14b902fd1 100644 --- a/docs/tutorials/wiki2/src/authentication/CHANGES.txt +++ b/docs/tutorials/wiki2/src/authentication/CHANGES.txt @@ -1,4 +1,4 @@ 0.0 --- -- Initial version +- Initial version. diff --git a/docs/tutorials/wiki2/src/authentication/MANIFEST.in b/docs/tutorials/wiki2/src/authentication/MANIFEST.in index 42cd299b5..05cc195d9 100644 --- a/docs/tutorials/wiki2/src/authentication/MANIFEST.in +++ b/docs/tutorials/wiki2/src/authentication/MANIFEST.in @@ -1,2 +1,2 @@ include *.txt *.ini *.cfg *.rst -recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.jinja2 *.pt *.txt *.mak *.mako *.js *.html *.xml +recursive-include tutorial *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml *.jinja2 diff --git a/docs/tutorials/wiki2/src/authentication/README.txt b/docs/tutorials/wiki2/src/authentication/README.txt index 5b0101e5f..8466fd7b5 100644 --- a/docs/tutorials/wiki2/src/authentication/README.txt +++ b/docs/tutorials/wiki2/src/authentication/README.txt @@ -1,14 +1,33 @@ -tutorial README -================== +myproj +=============================== Getting Started --------------- -- cd +- Change directory into your newly created project. -- $VENV/bin/pip install -e . + cd myproj -- $VENV/bin/initialize_tutorial_db development.ini +- Create a Python virtual environment. -- $VENV/bin/pserve development.ini + python3 -m venv env +- Upgrade packaging tools. + + env/bin/pip install --upgrade pip setuptools wheel + +- Install the project in editable mode with its testing requirements. + + env/bin/pip install -e ".[testing]" + +- Configure the database. + + env/bin/initialize_tutorial_db development.ini + +- Run your project's tests. + + env/bin/pytest + +- Run your project. + + env/bin/pserve development.ini diff --git a/docs/tutorials/wiki2/src/authentication/development.ini b/docs/tutorials/wiki2/src/authentication/development.ini index a767a0e6f..1e08d1bce 100644 --- a/docs/tutorials/wiki2/src/authentication/development.ini +++ b/docs/tutorials/wiki2/src/authentication/development.ini @@ -1,6 +1,6 @@ ### # app configuration -# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html ### [app:main] @@ -13,7 +13,6 @@ pyramid.debug_routematch = false pyramid.default_locale_name = en pyramid.includes = pyramid_debugtoolbar - pyramid_tm sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite @@ -33,7 +32,7 @@ listen = 127.0.0.1:6543 [::1]:6543 ### # logging configuration -# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html ### [loggers] diff --git a/docs/tutorials/wiki2/src/authentication/production.ini b/docs/tutorials/wiki2/src/authentication/production.ini index f27dc09d4..05d60feec 100644 --- a/docs/tutorials/wiki2/src/authentication/production.ini +++ b/docs/tutorials/wiki2/src/authentication/production.ini @@ -1,6 +1,6 @@ ### # app configuration -# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html ### [app:main] @@ -16,13 +16,17 @@ sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite auth.secret = real-seekrit +### +# wsgi server configuration +### + [server:main] use = egg:waitress#main listen = *:6543 ### # logging configuration -# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html ### [loggers] diff --git a/docs/tutorials/wiki2/src/authentication/pytest.ini b/docs/tutorials/wiki2/src/authentication/pytest.ini new file mode 100644 index 000000000..8b76bc410 --- /dev/null +++ b/docs/tutorials/wiki2/src/authentication/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +testpaths = tutorial +python_files = *.py diff --git a/docs/tutorials/wiki2/src/authentication/setup.py b/docs/tutorials/wiki2/src/authentication/setup.py index def3ce1f6..cc1aa421c 100644 --- a/docs/tutorials/wiki2/src/authentication/setup.py +++ b/docs/tutorials/wiki2/src/authentication/setup.py @@ -19,39 +19,42 @@ requires = [ 'transaction', 'zope.sqlalchemy', 'waitress', - ] +] tests_require = [ 'WebTest >= 1.3.1', # py3 compat - 'pytest', # includes virtualenv + 'pytest', 'pytest-cov', - ] +] -setup(name='tutorial', - version='0.0', - description='tutorial', - long_description=README + '\n\n' + CHANGES, - classifiers=[ - "Programming Language :: Python", - "Framework :: Pyramid", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", - ], - author='', - author_email='', - url='', - keywords='web wsgi bfg pylons pyramid', - packages=find_packages(), - include_package_data=True, - zip_safe=False, - extras_require={ - 'testing': tests_require, - }, - install_requires=requires, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - [console_scripts] - initialize_tutorial_db = tutorial.scripts.initializedb:main - """, - ) +setup( + name='tutorial', + version='0.0', + description='myproj', + long_description=README + '\n\n' + CHANGES, + classifiers=[ + 'Programming Language :: Python', + 'Framework :: Pyramid', + 'Topic :: Internet :: WWW/HTTP', + 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application', + ], + author='', + author_email='', + url='', + keywords='web pyramid pylons', + packages=find_packages(), + include_package_data=True, + zip_safe=False, + extras_require={ + 'testing': tests_require, + }, + install_requires=requires, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main', + ], + 'console_scripts': [ + 'initialize_tutorial_db = tutorial.scripts.initializedb:main', + ], + }, +) -- cgit v1.2.3 From 266dea26ac6cabb66ee94e8dddc15c1c97e3bf2a Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 23 Dec 2016 18:03:12 -0800 Subject: wiki2/src/authentication update files --- docs/tutorials/wiki2/src/authentication/tutorial/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/tutorial/tests.py b/docs/tutorials/wiki2/src/authentication/tutorial/tests.py index 99e95efd3..ce650ca7c 100644 --- a/docs/tutorials/wiki2/src/authentication/tutorial/tests.py +++ b/docs/tutorials/wiki2/src/authentication/tutorial/tests.py @@ -54,7 +54,7 @@ class TestMyViewSuccessCondition(BaseTest): from .views.default import my_view info = my_view(dummy_request(self.session)) self.assertEqual(info['one'].name, 'one') - self.assertEqual(info['project'], 'tutorial') + self.assertEqual(info['project'], 'myproj') class TestMyViewFailureCondition(BaseTest): -- cgit v1.2.3 From 3ec0fca8285847c856e24bb052062480952fca73 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 1 Mar 2017 03:00:58 -0800 Subject: use correct directory name for cookiecutter generated README.txt (cherry picked from commit 40dd034) Refs: https://github.com/Pylons/pyramid-cookiecutter-starter/pull/22 --- docs/tutorials/wiki2/src/authentication/README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/README.txt b/docs/tutorials/wiki2/src/authentication/README.txt index 8466fd7b5..5e21b8aa4 100644 --- a/docs/tutorials/wiki2/src/authentication/README.txt +++ b/docs/tutorials/wiki2/src/authentication/README.txt @@ -6,7 +6,7 @@ Getting Started - Change directory into your newly created project. - cd myproj + cd tutorial - Create a Python virtual environment. -- cgit v1.2.3 From 4b743ad895e914d31b75d446118d219e36435711 Mon Sep 17 00:00:00 2001 From: Jeremy Chen Date: Sat, 15 Apr 2017 19:25:46 +1000 Subject: Update default.py --- docs/tutorials/wiki2/src/authentication/tutorial/views/default.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/tutorial/views/default.py b/docs/tutorials/wiki2/src/authentication/tutorial/views/default.py index 1b071434c..2d058d874 100644 --- a/docs/tutorials/wiki2/src/authentication/tutorial/views/default.py +++ b/docs/tutorials/wiki2/src/authentication/tutorial/views/default.py @@ -1,4 +1,4 @@ -import cgi +from pyramid.compat import escape import re from docutils.core import publish_parts @@ -32,10 +32,10 @@ def view_page(request): exists = request.dbsession.query(Page).filter_by(name=word).all() if exists: view_url = request.route_url('view_page', pagename=word) - return '%s' % (view_url, cgi.escape(word)) + return '%s' % (view_url, escape(word)) else: add_url = request.route_url('add_page', pagename=word) - return '%s' % (add_url, cgi.escape(word)) + return '%s' % (add_url, escape(word)) content = publish_parts(page.data, writer_name='html')['html_body'] content = wikiwords.sub(add_link, content) -- cgit v1.2.3 From 6d120e5f740f3b9a3f9ffd52da5c748b2f06cbca Mon Sep 17 00:00:00 2001 From: Aleph Melo Date: Sun, 16 Apr 2017 16:50:45 -0300 Subject: Fix #2927 - Change to listen = localhost:6543. --- docs/tutorials/wiki2/src/authentication/development.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/development.ini b/docs/tutorials/wiki2/src/authentication/development.ini index 1e08d1bce..0786c1f66 100644 --- a/docs/tutorials/wiki2/src/authentication/development.ini +++ b/docs/tutorials/wiki2/src/authentication/development.ini @@ -28,7 +28,7 @@ auth.secret = seekrit [server:main] use = egg:waitress#main -listen = 127.0.0.1:6543 [::1]:6543 +listen = localhost:6543 ### # logging configuration -- cgit v1.2.3 From 68f673ff520c4bdffac796c9965936ec57916c72 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 28 Apr 2017 00:09:20 -0700 Subject: update cookiecutter README.txt throughout docs - https://github.com/Pylons/pyramid-cookiecutter-starter/pull/28 - https://github.com/Pylons/pyramid-cookiecutter-zodb/pull/7 - https://github.com/Pylons/pyramid-cookiecutter-alchemy/pull/8 --- docs/tutorials/wiki2/src/authentication/README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/src/authentication') diff --git a/docs/tutorials/wiki2/src/authentication/README.txt b/docs/tutorials/wiki2/src/authentication/README.txt index 5e21b8aa4..81102a869 100644 --- a/docs/tutorials/wiki2/src/authentication/README.txt +++ b/docs/tutorials/wiki2/src/authentication/README.txt @@ -1,5 +1,5 @@ myproj -=============================== +====== Getting Started --------------- -- cgit v1.2.3