From bc063da0e248c9b6df6af29ec1f5217accd703d2 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sun, 17 Mar 2013 13:09:59 +0200 Subject: no need to re-install This will continue working fine. --- docs/tutorials/wiki2/definingmodels.rst | 2 -- 1 file changed, 2 deletions(-) (limited to 'docs/tutorials') diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst index bd1cb00d7..99f7969bc 100644 --- a/docs/tutorials/wiki2/definingmodels.rst +++ b/docs/tutorials/wiki2/definingmodels.rst @@ -77,8 +77,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. -- cgit v1.2.3 From 9435d665b797e7a61410cf608d1f1bff4695c2f8 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 21 Mar 2013 01:54:00 +0200 Subject: revert to a better paragraph --- docs/tutorials/wiki2/installation.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/tutorials') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index 4b09f6eb7..bb22371ab 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -70,7 +70,9 @@ Install Pyramid Into the Virtual Python Environment SQLite3 ------- -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 from python.org On a Debian system, this would be: +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: .. code-block:: text -- cgit v1.2.3 From a4010d1b2d3e7c266c2369bb166cf2d7cfafc783 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 21 Mar 2013 02:03:20 +0200 Subject: slightly re-organise --- docs/tutorials/wiki2/installation.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'docs/tutorials') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index 4b09f6eb7..f55c047ba 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -76,16 +76,17 @@ If you used a package manager to install your Python, or if you compiled your Py $ sudo apt-get install libsqlite3-dev -#. Switch to the ``pyramidtut`` directory: +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: .. code-block:: text $ cd pyramidtut -Windows Requirements --------------------- - -#. Switch to the ``pyramidtut`` directory: +And run this if you are on Windows: .. code-block:: text -- cgit v1.2.3 From f1c29f104a14dea0be612ca0aa8ecd49e165fafa Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 21 Mar 2013 18:24:31 +0200 Subject: add hyperlinks for SQLAlchemy --- docs/tutorials/wiki2/basiclayout.rst | 6 +++--- docs/tutorials/wiki2/definingmodels.rst | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'docs/tutorials') 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..d55da02cd 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. -- cgit v1.2.3