summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/basiclayout.rst
diff options
context:
space:
mode:
authorsergey.volobuev <sergey@mooball.com>2013-03-29 07:45:13 +1000
committerBert JW Regeer <bertjw@regeer.org>2013-09-06 18:46:09 -0600
commitdb51d27579d5177c415643707abf3108dc209923 (patch)
treecdfc614be52720b3d99d4ad557763fa9033d1526 /docs/tutorials/wiki2/basiclayout.rst
parent4ead1210a1f98faf224f19e9382e1cea6b1dd9f9 (diff)
downloadpyramid-db51d27579d5177c415643707abf3108dc209923.tar.gz
pyramid-db51d27579d5177c415643707abf3108dc209923.tar.bz2
pyramid-db51d27579d5177c415643707abf3108dc209923.zip
changed the explanation of the (now missing) __init__ method
Diffstat (limited to 'docs/tutorials/wiki2/basiclayout.rst')
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst
index 0193afab4..4b78b30d1 100644
--- a/docs/tutorials/wiki2/basiclayout.rst
+++ b/docs/tutorials/wiki2/basiclayout.rst
@@ -225,10 +225,11 @@ To give a simple example of a model class, we define one named ``MyModel``:
:linenos:
:language: py
-Our example model has an ``__init__`` method that takes two arguments
-(``name``, and ``value``). It stores these values as ``self.name`` and
-``self.value`` on the instance created by the ``__init__`` function itself.
-The ``MyModel`` class also has a ``__tablename__`` attribute. This informs
+Our example model does not require an ``__init__`` method because SQLAlchemy
+supplies for us a default constructor if one is not already present,
+which accepts keyword arguments of the same name as that of the mapped attributes.
+
+The ``MyModel`` class has a ``__tablename__`` attribute. This informs
SQLAlchemy which table to use to store the data representing instances of this
class.