LuisCastilloH
2018-05-16 fa9291399199c2f9d80d532a0e8c3dd50d8563fb
commit | author | age
b1b922 1 =================
PE 2 Tutorial Approach
3 =================
4
b61a8b 5 This tutorial uses conventions to keep the introduction focused and concise.
SP 6 Details, references, and deeper discussions are mentioned in "See also" notes.
b1b922 7
2033ee 8 .. seealso:: This is an example "See also" note.
b1b922 9
b61a8b 10
SP 11 Directory tree
b1b922 12 ==============
b00c4e 13
SP 14 This "Getting Started" tutorial is broken into independent steps, starting with
15 the smallest possible "single file WSGI app" example. Each of these steps
16 introduces a topic and a very small set of concepts via working code. The steps
17 each correspond to a directory in our workspace, where each step's directory is
fa9291 18 a Python package. Source code used in this tutorial is located in the `Pyramid repository in the directory "docs/quick_tutorial" <https://github.com/Pylons/pyramid/>`_. You may ``git clone`` the repository, download, or copy-paste the source code. If you do so, then make sure you use the same branch as this documentation.
b1b922 19
b61a8b 20 As we develop our tutorial, our directory tree will resemble the structure
SP 21 below:
b1b922 22
b61a8b 23 .. code-block:: text
b1b922 24
b61a8b 25     quick_tutorial
f3a884 26         │── env
SP 27         `── request_response
28             `── tutorial
29             │   │── __init__.py
30             │   │── tests.py
31             │   `── views.py
32             │── development.ini
33             `── setup.py
b61a8b 34
b00c4e 35 Each of the directories in our ``quick_tutorial`` workspace (e.g., ``request_response``) is a *Python
789a90 36 project* (except as noted for the ``hello_world`` step). The ``tutorial``
b00c4e 37 directory is a *Python package*.
SP 38
39 For most steps you will copy the previous step's directory to a new directory, and change your working directory to the new directory, then install your project:
40
41 .. code-block:: bash
42
43     $ cd ..; cp -r package ini; cd ini
44     $ $VENV/bin/pip install -e .
45
46 For a few steps, you won't copy the previous step's directory, but you will still need to install your project with ``$VENV/bin/pip install -e .``.