summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst3
-rw-r--r--docs/tutorials/wiki2/src/basiclayout/tutorial/models.py3
2 files changed, 6 insertions, 0 deletions
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)