diff options
Diffstat (limited to 'docs')
22 files changed, 85 insertions, 85 deletions
diff --git a/docs/quick_tutorial/authentication.rst b/docs/quick_tutorial/authentication.rst index aaebba7ea..63db47c06 100644 --- a/docs/quick_tutorial/authentication.rst +++ b/docs/quick_tutorial/authentication.rst @@ -32,8 +32,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes authentication; cd authentication - (env27)$ python setup.py develop + (env)$ cd ..; cp -r view_classes authentication; cd authentication + (env)$ python setup.py develop #. Put the security hash in the ``authentication/development.ini`` configuration file as ``tutorial.secret`` instead of putting it in @@ -77,7 +77,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` in a browser. diff --git a/docs/quick_tutorial/authorization.rst b/docs/quick_tutorial/authorization.rst index 9acd3b4a5..e7e3b0306 100644 --- a/docs/quick_tutorial/authorization.rst +++ b/docs/quick_tutorial/authorization.rst @@ -37,8 +37,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r authentication authorization; cd authorization - (env27)$ python setup.py develop + (env)$ cd ..; cp -r authentication authorization; cd authorization + (env)$ python setup.py develop #. Start by changing ``authorization/tutorial/__init__.py`` to specify a root factory to the :term:`configurator`: @@ -62,7 +62,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` in a browser. diff --git a/docs/quick_tutorial/databases.rst b/docs/quick_tutorial/databases.rst index d2d2ce699..ea03677b2 100644 --- a/docs/quick_tutorial/databases.rst +++ b/docs/quick_tutorial/databases.rst @@ -41,7 +41,7 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r forms databases; cd databases + (env)$ cd ..; cp -r forms databases; cd databases #. We need to add some dependencies in ``databases/setup.py`` as well as an "entry point" for the command-line script: @@ -75,7 +75,7 @@ Steps .. code-block:: bash - (env27)$ python setup.py develop + (env)$ python setup.py develop #. The script references some models in ``databases/tutorial/models.py``: @@ -86,7 +86,7 @@ Steps .. code-block:: bash - (env27)$ initialize_tutorial_db development.ini + (env)$ initialize_tutorial_db development.ini 2013-09-06 15:54:08,050 INFO [sqlalchemy.engine.base.Engine][MainThread] PRAGMA table_info("wikipages") 2013-09-06 15:54:08,050 INFO [sqlalchemy.engine.base.Engine][MainThread] () 2013-09-06 15:54:08,051 INFO [sqlalchemy.engine.base.Engine][MainThread] @@ -113,7 +113,7 @@ Steps .. code-block:: bash - (env27)$ nosetests . + (env)$ nosetests . .. ----------------------------------------------------------------- Ran 2 tests in 1.141s @@ -124,7 +124,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` in a browser. diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst index 42e665d4f..abf6ff77e 100644 --- a/docs/quick_tutorial/debugtoolbar.rst +++ b/docs/quick_tutorial/debugtoolbar.rst @@ -33,9 +33,9 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r ini debugtoolbar; cd debugtoolbar - (env27)$ python setup.py develop - (env27)$ easy_install pyramid_debugtoolbar + (env)$ cd ..; cp -r ini debugtoolbar; cd debugtoolbar + (env)$ python setup.py develop + (env)$ easy_install pyramid_debugtoolbar #. Our ``debugtoolbar/development.ini`` gets a configuration entry for @@ -49,7 +49,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` in your browser. See the handy toolbar on the right. diff --git a/docs/quick_tutorial/forms.rst b/docs/quick_tutorial/forms.rst index bb7cab3f7..21692832f 100644 --- a/docs/quick_tutorial/forms.rst +++ b/docs/quick_tutorial/forms.rst @@ -36,7 +36,7 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes forms; cd forms + (env)$ cd ..; cp -r view_classes forms; cd forms #. Let's edit ``forms/setup.py`` to declare a dependency on Deform (which then pulls in Colander as a dependency: @@ -48,7 +48,7 @@ Steps .. code-block:: bash - (env27)$ python setup.py develop + (env)$ python setup.py develop #. Register a static view in ``forms/tutorial/__init__.py`` for Deform's CSS/JS etc. as well as our demo wikipage scenario's @@ -88,7 +88,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` in a browser. diff --git a/docs/quick_tutorial/functional_testing.rst b/docs/quick_tutorial/functional_testing.rst index 777cb01e2..c3d3299bc 100644 --- a/docs/quick_tutorial/functional_testing.rst +++ b/docs/quick_tutorial/functional_testing.rst @@ -31,9 +31,9 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r unit_testing functional_testing; cd functional_testing - (env27)$ python setup.py develop - (env27)$ easy_install webtest + (env)$ cd ..; cp -r unit_testing functional_testing; cd functional_testing + (env)$ python setup.py develop + (env)$ easy_install webtest #. Let's extend ``unit_testing/tutorial/tests.py`` to include a functional test: @@ -46,7 +46,7 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial . ---------------------------------------------------------------------- Ran 2 tests in 0.141s diff --git a/docs/quick_tutorial/hello_world.rst b/docs/quick_tutorial/hello_world.rst index e3ad820ac..36ffe9d1e 100644 --- a/docs/quick_tutorial/hello_world.rst +++ b/docs/quick_tutorial/hello_world.rst @@ -46,7 +46,7 @@ Steps .. code-block:: bash - (env27)$ mkdir hello_world; cd hello_world + (env)$ mkdir hello_world; cd hello_world #. Copy the following into ``hello_world/app.py``: @@ -57,7 +57,7 @@ Steps .. code-block:: bash - (env27)$ python app.py + (env)$ python app.py #. Open ``http://localhost:6543/`` in your browser. diff --git a/docs/quick_tutorial/ini.rst b/docs/quick_tutorial/ini.rst index 66247c92d..4210e8608 100644 --- a/docs/quick_tutorial/ini.rst +++ b/docs/quick_tutorial/ini.rst @@ -35,7 +35,7 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r package ini; cd ini + (env)$ cd ..; cp -r package ini; cd ini #. Our ``ini/setup.py`` needs a setuptools "entry point" in the ``setup()`` function: @@ -48,7 +48,7 @@ Steps .. code-block:: bash - (env27)$ python setup.py develop + (env)$ python setup.py develop #. Let's make a file ``ini/development.ini`` for our configuration: @@ -66,13 +66,13 @@ Steps .. code-block:: bash - (env27)$ rm tutorial/app.py + (env)$ rm tutorial/app.py #. Run your Pyramid application with: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/``. diff --git a/docs/quick_tutorial/jinja2.rst b/docs/quick_tutorial/jinja2.rst index ad5b8a9ca..bdca65e68 100644 --- a/docs/quick_tutorial/jinja2.rst +++ b/docs/quick_tutorial/jinja2.rst @@ -23,9 +23,9 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes jinja2; cd jinja2 - (env27)$ python setup.py develop - (env27)$ easy_install pyramid_jinja2 + (env)$ cd ..; cp -r view_classes jinja2; cd jinja2 + (env)$ python setup.py develop + (env)$ easy_install pyramid_jinja2 #. We need to add an item to ``pyramid.includes`` in ``jinja2/development.ini``: @@ -54,13 +54,13 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial #. Run your Pyramid application with: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` in your browser. diff --git a/docs/quick_tutorial/json.rst b/docs/quick_tutorial/json.rst index f08db6849..4727a102a 100644 --- a/docs/quick_tutorial/json.rst +++ b/docs/quick_tutorial/json.rst @@ -28,8 +28,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes json; cd json - (env27)$ python setup.py develop + (env)$ cd ..; cp -r view_classes json; cd json + (env)$ python setup.py develop #. We add a new route for ``hello_json`` in ``json/tutorial/__init__.py``: @@ -53,13 +53,13 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial #. Run your Pyramid application with: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/howdy.json`` in your browser and you will see the resulting JSON response. diff --git a/docs/quick_tutorial/logging.rst b/docs/quick_tutorial/logging.rst index e68cd536b..92e08a926 100644 --- a/docs/quick_tutorial/logging.rst +++ b/docs/quick_tutorial/logging.rst @@ -32,8 +32,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes logging; cd logging - (env27)$ python setup.py develop + (env)$ cd ..; cp -r view_classes logging; cd logging + (env)$ python setup.py develop #. Extend ``logging/tutorial/views.py`` to log a message: @@ -44,13 +44,13 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial #. Run your Pyramid application with: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` and ``http://localhost:6543/howdy`` in your browser. Note, both in the console and in the debug diff --git a/docs/quick_tutorial/more_view_classes.rst b/docs/quick_tutorial/more_view_classes.rst index 4a4b62683..a5d03fd0c 100644 --- a/docs/quick_tutorial/more_view_classes.rst +++ b/docs/quick_tutorial/more_view_classes.rst @@ -55,8 +55,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r templating more_view_classes; cd more_view_classes - (env27)$ python setup.py develop + (env)$ cd ..; cp -r templating more_view_classes; cd more_view_classes + (env)$ python setup.py develop #. Our route in ``more_view_classes/tutorial/__init__.py`` needs some replacement patterns: @@ -98,7 +98,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/howdy/jane/doe`` in your browser. Click the ``Save`` and ``Delete`` buttons and watch the output in the diff --git a/docs/quick_tutorial/package.rst b/docs/quick_tutorial/package.rst index da6624cb1..11760bda0 100644 --- a/docs/quick_tutorial/package.rst +++ b/docs/quick_tutorial/package.rst @@ -56,7 +56,7 @@ Steps .. code-block:: bash - (env27)$ cd ..; mkdir package; cd package + (env)$ cd ..; mkdir package; cd package #. In ``package/setup.py``, enter the following: @@ -67,8 +67,8 @@ Steps .. code-block:: bash - (env27)$ python setup.py develop - (env27)$ mkdir tutorial + (env)$ python setup.py develop + (env)$ mkdir tutorial #. Enter the following into ``package/tutorial/__init__.py``: @@ -82,7 +82,7 @@ Steps .. code-block:: bash - (env27)$ python tutorial/app.py + (env)$ python tutorial/app.py #. Open ``http://localhost:6543/`` in your browser. diff --git a/docs/quick_tutorial/request_response.rst b/docs/quick_tutorial/request_response.rst index 7d11cd3c3..6c360557c 100644 --- a/docs/quick_tutorial/request_response.rst +++ b/docs/quick_tutorial/request_response.rst @@ -38,8 +38,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes request_response; cd request_response - (env27)$ python setup.py develop + (env)$ cd ..; cp -r view_classes request_response; cd request_response + (env)$ python setup.py develop #. Simplify the routes in ``request_response/tutorial/__init__.py``: @@ -57,13 +57,13 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial #. Run your Pyramid application with: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` in your browser. You will be redirected to ``http://localhost:6543/plain`` diff --git a/docs/quick_tutorial/routing.rst b/docs/quick_tutorial/routing.rst index 33b1edb28..b1cb0d806 100644 --- a/docs/quick_tutorial/routing.rst +++ b/docs/quick_tutorial/routing.rst @@ -45,8 +45,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes routing; cd routing - (env27)$ python setup.py develop + (env)$ cd ..; cp -r view_classes routing; cd routing + (env)$ python setup.py develop #. Our ``routing/tutorial/__init__.py`` needs a route with a replacement pattern: @@ -74,13 +74,13 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial #. Run your Pyramid application with: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/howdy/amy/smith`` in your browser. diff --git a/docs/quick_tutorial/scaffolds.rst b/docs/quick_tutorial/scaffolds.rst index cbd198414..b13bdec0b 100644 --- a/docs/quick_tutorial/scaffolds.rst +++ b/docs/quick_tutorial/scaffolds.rst @@ -33,7 +33,7 @@ Steps .. code-block:: bash - (env27)$ pcreate --list + (env)$ pcreate --list Available scaffolds: alchemy: Pyramid SQLAlchemy project using url dispatch starter: Pyramid starter project @@ -43,21 +43,21 @@ Steps .. code-block:: bash - (env27)$ pcreate --scaffold starter scaffolds + (env)$ pcreate --scaffold starter scaffolds #. Use normal Python development to setup our project for development: .. code-block:: bash - (env27)$ cd scaffolds - (env27)$ python setup.py develop + (env)$ cd scaffolds + (env)$ python setup.py develop #. Startup the application by pointing Pyramid's ``pserve`` command at the project's (generated) configuration file: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload On startup, ``pserve`` logs some output: diff --git a/docs/quick_tutorial/sessions.rst b/docs/quick_tutorial/sessions.rst index b50d6d318..fad86fad4 100644 --- a/docs/quick_tutorial/sessions.rst +++ b/docs/quick_tutorial/sessions.rst @@ -31,8 +31,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes sessions; cd sessions - (env27)$ python setup.py develop + (env)$ cd ..; cp -r view_classes sessions; cd sessions + (env)$ python setup.py develop #. Our ``sessions/tutorial/__init__.py`` needs a choice of session factory to get registered with the :term:`configurator`: @@ -56,13 +56,13 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial #. Run your Pyramid application with: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` and ``http://localhost:6543/howdy`` in your browser. As you reload and switch between those URLs, note diff --git a/docs/quick_tutorial/static_assets.rst b/docs/quick_tutorial/static_assets.rst index 3aaf6168c..d02643f5a 100644 --- a/docs/quick_tutorial/static_assets.rst +++ b/docs/quick_tutorial/static_assets.rst @@ -20,8 +20,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r view_classes static_assets; cd static_assets - (env27)$ python setup.py develop + (env)$ cd ..; cp -r view_classes static_assets; cd static_assets + (env)$ python setup.py develop #. We add a call ``config.add_static_view in ``static_assets/tutorial/__init__.py``: @@ -45,13 +45,13 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial #. Run your Pyramid application with: .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` in your browser. diff --git a/docs/quick_tutorial/templating.rst b/docs/quick_tutorial/templating.rst index ee4542485..5f3fb8975 100644 --- a/docs/quick_tutorial/templating.rst +++ b/docs/quick_tutorial/templating.rst @@ -36,8 +36,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r views templating; cd templating - (env27)$ python setup.py develop + (env)$ cd ..; cp -r views templating; cd templating + (env)$ python setup.py develop #. Our ``templating/tutorial/views.py`` no longer has HTML in it: @@ -66,7 +66,7 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial . ---------------------------------------------------------------------- Ran 4 tests in 0.141s @@ -77,7 +77,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` and ``http://localhost:6543/howdy`` in your browser. diff --git a/docs/quick_tutorial/unit_testing.rst b/docs/quick_tutorial/unit_testing.rst index 566e09252..e87c5af62 100644 --- a/docs/quick_tutorial/unit_testing.rst +++ b/docs/quick_tutorial/unit_testing.rst @@ -45,9 +45,9 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r debugtoolbar unit_testing; cd unit_testing - (env27)$ python setup.py develop - (env27)$ easy_install nose + (env)$ cd ..; cp -r debugtoolbar unit_testing; cd unit_testing + (env)$ python setup.py develop + (env)$ easy_install nose #. Now we write a simple unit test in ``unit_testing/tutorial/tests.py``: @@ -59,7 +59,7 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial . ---------------------------------------------------------------------- Ran 1 test in 0.141s diff --git a/docs/quick_tutorial/view_classes.rst b/docs/quick_tutorial/view_classes.rst index e06e7f6c0..02d8a04fd 100644 --- a/docs/quick_tutorial/view_classes.rst +++ b/docs/quick_tutorial/view_classes.rst @@ -39,8 +39,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r templating view_classes; cd view_classes - (env27)$ python setup.py develop + (env)$ cd ..; cp -r templating view_classes; cd view_classes + (env)$ python setup.py develop #. Our ``view_classes/tutorial/views.py`` now has a view class with our two views: @@ -60,7 +60,7 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial . ---------------------------------------------------------------------- Ran 4 tests in 0.141s @@ -71,7 +71,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` and ``http://localhost:6543/howdy`` in your browser. diff --git a/docs/quick_tutorial/views.rst b/docs/quick_tutorial/views.rst index f36387027..ca2a92adf 100644 --- a/docs/quick_tutorial/views.rst +++ b/docs/quick_tutorial/views.rst @@ -40,8 +40,8 @@ Steps .. code-block:: bash - (env27)$ cd ..; cp -r function_testing views; cd views - (env27)$ python setup.py develop + (env)$ cd ..; cp -r function_testing views; cd views + (env)$ python setup.py develop #. Our ``views/tutorial/__init__.py`` gets a lot shorter: @@ -64,7 +64,7 @@ Steps .. code-block:: bash - (env27)$ nosetests tutorial + (env)$ nosetests tutorial . ---------------------------------------------------------------------- Ran 4 tests in 0.141s @@ -75,7 +75,7 @@ Steps .. code-block:: bash - (env27)$ pserve development.ini --reload + (env)$ pserve development.ini --reload #. Open ``http://localhost:6543/`` and ``http://localhost:6543/howdy`` in your browser. |
