docs/conf.py | ●●●●● patch | view | raw | blame | history | |
docs/tutorials/wiki2/basiclayout.rst | ●●●●● patch | view | raw | blame | history | |
docs/tutorials/wiki2/definingmodels.rst | ●●●●● patch | view | raw | blame | history |
docs/conf.py
@@ -55,6 +55,7 @@ # Looks for objects in external projects intersphinx_mapping = { 'sqla': ('http://docs.sqlalchemy.org/en/rel_0_8/', None), 'who': ('http://docs.repoze.org/who/2.0', None), 'python': ('http://docs.python.org', None), 'python3': ('http://docs.python.org/3', None), docs/tutorials/wiki2/basiclayout.rst
@@ -43,9 +43,9 @@ 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 docs/tutorials/wiki2/definingmodels.rst
@@ -34,7 +34,7 @@ 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 @@ ``__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.