diff options
| author | Paul Everitt <paul@agendaless.com> | 2013-09-13 17:09:35 -0400 |
|---|---|---|
| committer | Paul Everitt <paul@agendaless.com> | 2013-09-13 17:09:35 -0400 |
| commit | 4042c772c8043ac96a22db439a736fec9ea2aafa (patch) | |
| tree | 88abca8bdea3781975822b716d7091b607fd1566 /docs/quick_tutorial/rest_ajax.rst | |
| parent | b1b92284f496800a4dfd2cea72cb9be07ba8661c (diff) | |
| download | pyramid-4042c772c8043ac96a22db439a736fec9ea2aafa.tar.gz pyramid-4042c772c8043ac96a22db439a736fec9ea2aafa.tar.bz2 pyramid-4042c772c8043ac96a22db439a736fec9ea2aafa.zip | |
All the references re-wired.
Diffstat (limited to 'docs/quick_tutorial/rest_ajax.rst')
| -rw-r--r-- | docs/quick_tutorial/rest_ajax.rst | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/docs/quick_tutorial/rest_ajax.rst b/docs/quick_tutorial/rest_ajax.rst deleted file mode 100644 index 69a940818..000000000 --- a/docs/quick_tutorial/rest_ajax.rst +++ /dev/null @@ -1,62 +0,0 @@ -================== -29: REST with Ajax -================== - -Use Ajax operations to talk to a REST interface. - -Objectives -========== - -- Populate a list with JSON data - -- Update contents with client-side forms that post to REST operations - -Steps -===== - -#. We are going to use the previous step as our starting point: - - .. code-block:: bash - - (env27)$ cd ..; cp -r rest_ajax_layout rest_ajax; cd rest_ajax - (env27)$ python setup.py develop - -#. Let's first add a Javascript file that implements our browser-side - logic and talks to the REST service: - -#. Introduce ``pyramid_jinja2`` dependency in - ``rest_ajax/tutorial/static/site.js``: - - .. literalinclude:: rest_ajax/tutorial/static/site.js - :language: js - :linenos: - -#. Add a ``<script>`` reference to this at the bottom of - ``rest_ajax/tutorial/templates/layout.jinja2`` - - .. literalinclude:: rest_ajax/tutorial/templates/layout.jinja2 - :language: html - :linenos: - -#. Update ``rest_ajax/tutorial/templates/folder.jinja2`` to include a - modal dialog: - - .. literalinclude:: rest_ajax/tutorial/templates/folder.jinja2 - :language: html - :linenos: - -#. Our views in ``rest_ajax/tutorial/views.py`` need to handle our - REST operations: - - .. literalinclude:: rest_ajax/tutorial/views.py - :linenos: - -#. Run your Pyramid application with: - - .. code-block:: bash - - (env27)$ pserve development.ini --reload - -#. Open ``http://localhost:6543/`` in your browser and - add (+ button), edit (click link), and delete (click trash icon) - items in the root folder.
\ No newline at end of file |
