summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HACKING.txt2
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst3
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/models.py3
3 files changed, 7 insertions, 1 deletions
diff --git a/HACKING.txt b/HACKING.txt
index b82041c71..d0f9a769e 100644
--- a/HACKING.txt
+++ b/HACKING.txt
@@ -189,7 +189,7 @@ Running Tests
Run the tests like so::
$ $VENV/bin/easy_install pytest
- $ py.test --strict pyramid/
+ $ $VENV/bin/py.test --strict pyramid/
- Functional tests related to the "scaffolds" (starter, zodb, alchemy) which
create a virtualenv, install the scaffold package and its dependencies, start
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst
index 623882516..08132e8cd 100644
--- a/docs/tutorials/wiki2/basiclayout.rst
+++ b/docs/tutorials/wiki2/basiclayout.rst
@@ -247,5 +247,8 @@ The ``MyModel`` class has a ``__tablename__`` attribute. This informs
SQLAlchemy which table to use to store the data representing instances of this
class.
+The Index import and the Index object creation is not required for this
+tutorial, and will be removed in the next step.
+
That's about all there is to it regarding models, views, and initialization
code in our stock application.
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/models.py b/docs/tutorials/wiki2/src/basiclayout/tutorial/models.py
index 0cdd4bbc3..11ddccadb 100644
--- a/docs/tutorials/wiki2/src/basiclayout/tutorial/models.py
+++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/models.py
@@ -2,6 +2,7 @@ from sqlalchemy import (
Column,
Integer,
Text,
+ Index,
)
from sqlalchemy.ext.declarative import declarative_base
@@ -22,3 +23,5 @@ class MyModel(Base):
id = Column(Integer, primary_key=True)
name = Column(Text, unique=True)
value = Column(Integer)
+
+Index('my_index', MyModel.name, unique=True, mysql_length=255)