diff options
| author | Chris McDonough <chrism@agendaless.com> | 2008-07-24 19:55:33 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2008-07-24 19:55:33 +0000 |
| commit | 932675884332070229ee5ada2c163f5e218fdb72 (patch) | |
| tree | ed065f36062d8591a8dbdfb2083f6686c47a93ed /docs/tutorials/lxmlgraph/step02.rst | |
| parent | c4d7f0b657c8863f34f3c9ea0bccb96aa7763877 (diff) | |
| download | pyramid-932675884332070229ee5ada2c163f5e218fdb72.tar.gz pyramid-932675884332070229ee5ada2c163f5e218fdb72.tar.bz2 pyramid-932675884332070229ee5ada2c163f5e218fdb72.zip | |
Filename cleanups.
Diffstat (limited to 'docs/tutorials/lxmlgraph/step02.rst')
| -rw-r--r-- | docs/tutorials/lxmlgraph/step02.rst | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/docs/tutorials/lxmlgraph/step02.rst b/docs/tutorials/lxmlgraph/step02.rst index b4987df28..ab2faf572 100644 --- a/docs/tutorials/lxmlgraph/step02.rst +++ b/docs/tutorials/lxmlgraph/step02.rst @@ -1,11 +1,12 @@ ================================================ -Step 02: Hello World as XML +Step 2: Hello World as XML ================================================ -We now have a default project. +We now have a default project named ``lxmlgraph``. It contains a +*package* (also) named ``lxmlgraph``. -In this step we will add an XML document as our model data. We will -leverage the following ``repoze.bfg`` machinery: +In this step we will add an XML document to the *package* as our model +data. We will leverage the following ``repoze.bfg`` machinery: - Model data with interfaces that define "types" @@ -18,8 +19,11 @@ Our application will need to do these things: - That model class needs to implement the "handshake" -File ``myapp/samplemodel.xml`` --------------------------------- +All of the below filenames are relative to the ``lxmlgraph`` *package* +rather than the project. + +File ``samplemodel.xml`` +----------------------------------- We're going to add an XML document that will serve as a source for model data named ``samplemodel.xml``. @@ -45,7 +49,7 @@ with an attribute matching the next hop. Also, the value of the ``@name`` should be unique in its containing node. -Module ``myapp/models.py`` +Module ``models.py`` ------------------------------ At a high level, we make write a class that "extends" lxml Element @@ -80,8 +84,8 @@ parser. the custom Python class registered. We then load some XML and return the top of the tree. -Module `myapp/views.py`` --------------------------- +Module ``views.py`` +----------------------------- Our ``views.py`` module does the following: |
