diff options
| author | Bert JW Regeer <bertjw@regeer.org> | 2013-09-06 19:07:22 -0600 |
|---|---|---|
| committer | Bert JW Regeer <bertjw@regeer.org> | 2013-09-06 19:07:22 -0600 |
| commit | ca51e11d86f9b4cb24f35e28fa3ab801fc6a49ec (patch) | |
| tree | 9aeff8ba00c1dabe09f2cc38007eadf6dd7c8005 /docs/tutorials/wiki2/basiclayout.rst | |
| parent | ab085ab7466d5100d045194fbd75cc2662fc6520 (diff) | |
| download | pyramid-ca51e11d86f9b4cb24f35e28fa3ab801fc6a49ec.tar.gz pyramid-ca51e11d86f9b4cb24f35e28fa3ab801fc6a49ec.tar.bz2 pyramid-ca51e11d86f9b4cb24f35e28fa3ab801fc6a49ec.zip | |
Add small note showing example usage of MyModel
Diffstat (limited to 'docs/tutorials/wiki2/basiclayout.rst')
| -rw-r--r-- | docs/tutorials/wiki2/basiclayout.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst index 4b78b30d1..1f3d630c7 100644 --- a/docs/tutorials/wiki2/basiclayout.rst +++ b/docs/tutorials/wiki2/basiclayout.rst @@ -229,6 +229,12 @@ 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. +.. note:: Example usage of MyModel: + + .. code-block:: python + + johnny = MyModel(name="John Doe", value=10) + The ``MyModel`` class has a ``__tablename__`` attribute. This informs SQLAlchemy which table to use to store the data representing instances of this class. |
