From 61adead5482cdb6fc07921e8bff787b99c980e52 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 30 Aug 2018 02:11:38 -0700 Subject: Update wiki with zodb cookiecutter source files --- docs/tutorials/wiki/src/views/README.txt | 2 +- docs/tutorials/wiki/src/views/development.ini | 3 +++ docs/tutorials/wiki/src/views/production.ini | 3 +++ docs/tutorials/wiki/src/views/setup.py | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki/src/views') diff --git a/docs/tutorials/wiki/src/views/README.txt b/docs/tutorials/wiki/src/views/README.txt index 5ec53bf9d..8a56d14af 100644 --- a/docs/tutorials/wiki/src/views/README.txt +++ b/docs/tutorials/wiki/src/views/README.txt @@ -14,7 +14,7 @@ Getting Started - Upgrade packaging tools. - env/bin/pip install --upgrade pip setuptools wheel + env/bin/pip install --upgrade pip setuptools - Install the project in editable mode with its testing requirements. diff --git a/docs/tutorials/wiki/src/views/development.ini b/docs/tutorials/wiki/src/views/development.ini index fec08941d..228f18f36 100644 --- a/docs/tutorials/wiki/src/views/development.ini +++ b/docs/tutorials/wiki/src/views/development.ini @@ -22,6 +22,9 @@ retry.attempts = 3 # '127.0.0.1' and '::1'. # debugtoolbar.hosts = 127.0.0.1 ::1 +[pshell] +setup = tutorial.pshell.setup + ### # wsgi server configuration ### diff --git a/docs/tutorials/wiki/src/views/production.ini b/docs/tutorials/wiki/src/views/production.ini index f2fa8d6d5..46b1e331b 100644 --- a/docs/tutorials/wiki/src/views/production.ini +++ b/docs/tutorials/wiki/src/views/production.ini @@ -16,6 +16,9 @@ zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 retry.attempts = 3 +[pshell] +setup = tutorial.pshell.setup + ### # wsgi server configuration ### diff --git a/docs/tutorials/wiki/src/views/setup.py b/docs/tutorials/wiki/src/views/setup.py index bd3d15af1..a11ae6c8f 100644 --- a/docs/tutorials/wiki/src/views/setup.py +++ b/docs/tutorials/wiki/src/views/setup.py @@ -24,7 +24,7 @@ requires = [ tests_require = [ 'WebTest >= 1.3.1', # py3 compat - 'pytest', + 'pytest>=3.7.4', 'pytest-cov', ] -- cgit v1.2.3 From 6cadff5aca91a799e69d641625d16280791653f6 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 30 Aug 2018 02:18:47 -0700 Subject: Update wiki with zodb cookiecutter source files --- docs/tutorials/wiki/src/views/.gitignore | 21 +++++++++++++++++++++ docs/tutorials/wiki/src/views/tutorial/pshell.py | 11 +++++++++++ 2 files changed, 32 insertions(+) create mode 100644 docs/tutorials/wiki/src/views/.gitignore create mode 100644 docs/tutorials/wiki/src/views/tutorial/pshell.py (limited to 'docs/tutorials/wiki/src/views') diff --git a/docs/tutorials/wiki/src/views/.gitignore b/docs/tutorials/wiki/src/views/.gitignore new file mode 100644 index 000000000..1853d983c --- /dev/null +++ b/docs/tutorials/wiki/src/views/.gitignore @@ -0,0 +1,21 @@ +*.egg +*.egg-info +*.pyc +*$py.class +*~ +.coverage +coverage.xml +build/ +dist/ +.tox/ +nosetests.xml +env*/ +tmp/ +Data.fs* +*.sublime-project +*.sublime-workspace +.*.sw? +.sw? +.DS_Store +coverage +test diff --git a/docs/tutorials/wiki/src/views/tutorial/pshell.py b/docs/tutorials/wiki/src/views/tutorial/pshell.py new file mode 100644 index 000000000..3d026291b --- /dev/null +++ b/docs/tutorials/wiki/src/views/tutorial/pshell.py @@ -0,0 +1,11 @@ +from . import models + +def setup(env): + request = env['request'] + + # start a transaction + request.tm.begin() + + # inject some vars into the shell builtins + env['tm'] = request.tm + env['models'] = models -- cgit v1.2.3