diff options
Diffstat (limited to 'docs/tutorials')
| -rw-r--r-- | docs/tutorials/wiki2/basiclayout.rst | 6 | ||||
| -rw-r--r-- | docs/tutorials/wiki2/definingmodels.rst | 11 | ||||
| -rw-r--r-- | docs/tutorials/wiki2/installation.rst | 18 |
3 files changed, 26 insertions, 9 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst index 86fe97956..eb2445864 100644 --- a/docs/tutorials/wiki2/basiclayout.rst +++ b/docs/tutorials/wiki2/basiclayout.rst @@ -43,9 +43,9 @@ above is executed. It accepts some settings and returns a :term:`WSGI` application. (See :ref:`startup_chapter` for more about ``pserve``.) The main function first creates a :term:`SQLAlchemy` database engine using -``engine_from_config`` from the ``sqlalchemy.`` prefixed settings in the -``development.ini`` file's ``[app:main]`` section. This will be a URI -(something like ``sqlite://``): +:func:`sqlalchemy.engine_from_config` from the ``sqlalchemy.`` prefixed +settings in the ``development.ini`` file's ``[app:main]`` section. +This will be a URI (something like ``sqlite://``): .. literalinclude:: src/basiclayout/tutorial/__init__.py :lines: 13 diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst index bd1cb00d7..60427a911 100644 --- a/docs/tutorials/wiki2/definingmodels.rst +++ b/docs/tutorials/wiki2/definingmodels.rst @@ -34,7 +34,7 @@ sample and we're not going to use it. Then, we added a ``Page`` class. Because this is a SQLAlchemy application, this class inherits from an instance of -:class:`sqlalchemy.ext.declarative.declarative_base`. +:func:`sqlalchemy.ext.declarative.declarative_base`. .. literalinclude:: src/models/tutorial/models.py :pyobject: Page @@ -45,9 +45,10 @@ As you can see, our ``Page`` class has a class level attribute ``__tablename__`` which equals the string ``'pages'``. This means that SQLAlchemy will store our wiki data in a SQL table named ``pages``. Our ``Page`` class will also have class-level attributes named ``id``, ``name`` and -``data`` (all instances of :class:`sqlalchemy.Column`). These will map to -columns in the ``pages`` table. The ``id`` attribute will be the primary key -in the table. The ``name`` attribute will be a text attribute, each value of +``data`` (all instances of :class:`sqlalchemy.schema.Column`). +These will map to columns in the ``pages`` table. +The ``id`` attribute will be the primary key in the table. +The ``name`` attribute will be a text attribute, each value of which needs to be unique within the column. The ``data`` attribute is a text attribute that will hold the body of each page. @@ -77,8 +78,6 @@ following: Installing the Project and re-initializing the Database ------------------------------------------------------- -Redo the steps in :ref:`installing_project_in_dev_mode`. - Because our model has changed, in order to reinitialize the database, we need to rerun the ``initialize_tutorial_db`` command to pick up the changes you've made to both the models.py file and to the initializedb.py file. diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index a8b8ee877..dd7c76d5f 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -70,6 +70,7 @@ Install Pyramid Into the Virtual Python Environment Install SQLite3 and Its Development Packages -------------------------------------------- +<<<<<<< HEAD If you used a package manager to install your Python or if you compiled your Python from source, then you must install SQLite3 and its development packages. If you downloaded your Python as an installer @@ -78,23 +79,40 @@ the next section :ref:`sql_making_a_project`.. If you need to install the SQLite3 packages, then, for example, using the Debian system and apt-get, the command would be the following: +======= +Install SQLite3 and its development packages if you don't already +have them installed. Usually this is via your system's package +manager. On a Debian system, this would be: +>>>>>>> upstream/master .. code-block:: text $ sudo apt-get install libsqlite3-dev +<<<<<<< HEAD Change Directory to Your Virtual Python Environment --------------------------------------------------- Change directory to the ``pyramidtut`` directory. **On UNIX:** +======= +Entering the virtualenv +----------------------- + +Do not forget to switch to the ``pyramidtut`` directory. +In order to do so, run this command if you are on Unix: +>>>>>>> upstream/master .. code-block:: text $ cd pyramidtut +<<<<<<< HEAD **On Windows** +======= +And run this if you are on Windows: +>>>>>>> upstream/master .. code-block:: text |
