[Checkins] SVN: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/ Bit cleanup

Baiju M baiju.m.mail at gmail.com
Sat Oct 10 10:02:57 EDT 2009


Log message for revision 105004:
  Bit cleanup
  

Changed:
  A   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/
  D   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/addLmsMain_form.zpt
  D   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/add_book.zpt
  U   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/app.py
  D   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/index_html.zpt
  D   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/show_books.zpt
  A   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/
  A   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/addLmsMain_form.zpt
  A   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/add_book.zpt
  A   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/index_html.zpt
  A   zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/show_books.zpt

-=-
Deleted: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/addLmsMain_form.zpt
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/addLmsMain_form.zpt	2009-10-10 13:47:05 UTC (rev 105002)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/addLmsMain_form.zpt	2009-10-10 14:02:56 UTC (rev 105004)
@@ -1,14 +0,0 @@
-<html>
-<head>
-<title>Add LMS</title>
-</head>
-<body>
-
-  <form action="addLmsMain" method="POST">
-    LMS Id:
-    <input type="text" name="id" /> <br />
-    <input type="submit" value="Add LMS" />
-  </form>
-
-</body>
-</html>

Deleted: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/add_book.zpt
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/add_book.zpt	2009-10-10 13:47:05 UTC (rev 105002)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/add_book.zpt	2009-10-10 14:02:56 UTC (rev 105004)
@@ -1,20 +0,0 @@
-<html>
-<head>
-<title>Welcome to LMS!</title>
-</head>
-<body>
-
-<h1>Add Book</h1>
-
-  <form action="insert_book" method="POST">
-    Barcode:
-    <input type="text" name="barcode" /> <br />
-    Book Title:
-    <input type="text" name="title" /> <br />
-    Book Author:
-    <input type="text" name="author" /> <br />
-    <input type="submit" value="Add Book" />
-  </form>
-
-</body>
-</html>

Modified: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/app.py
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/app.py	2009-10-10 13:47:05 UTC (rev 105002)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/app.py	2009-10-10 14:02:56 UTC (rev 105004)
@@ -2,7 +2,7 @@
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 from lms.main.book import Book
 
-addLmsMain_form =  PageTemplateFile('addLmsMain_form', globals())
+addLmsMain_form =  PageTemplateFile('zpts/addLmsMain_form', globals())
 
 
 def addLmsMain(dispatcher, id):
@@ -17,11 +17,11 @@
 
     meta_type = "LMS"
 
-    index_html = PageTemplateFile('index_html', globals())
+    index_html = PageTemplateFile('zpts/index_html', globals())
 
-    add_book = PageTemplateFile('add_book', globals())
+    add_book = PageTemplateFile('zpts/add_book', globals())
 
-    show_books = PageTemplateFile('show_books', globals())
+    show_books = PageTemplateFile('zpts/show_books', globals())
 
     def insert_book(self):
         """Insert book"""
@@ -36,4 +36,4 @@
         book.title = title
         book.author = author
         self.books._setObject(barcode, book)
-        return "Book added: %s" % barcode
+        request.RESPONSE.redirect(".")

Deleted: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/index_html.zpt
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt	2009-10-10 13:47:05 UTC (rev 105002)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/index_html.zpt	2009-10-10 14:02:56 UTC (rev 105004)
@@ -1,14 +0,0 @@
-<html>
-<head>
-<title>Welcome to LMS!</title>
-</head>
-<body>
-
-<h1>Welcome to LMS!</h1>
-
-<a href="add_book">Add Book</a> <br />
-
-<a href="show_books">Show Books</a>
-
-</body>
-</html>

Deleted: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/show_books.zpt
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/show_books.zpt	2009-10-10 13:47:05 UTC (rev 105002)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/show_books.zpt	2009-10-10 14:02:56 UTC (rev 105004)
@@ -1,16 +0,0 @@
-<html>
-<head>
-<title>Welcome to LMS!</title>
-</head>
-<body>
-
-<h1>Show Books</h1>
-
-<ol tal:repeat="item context/objectValues">
-  <td tal:content="item/barcode">Barcode</td>.
-  <td tal:content="item/title">Title</td>
-  (<td tal:content="item/author">Author</td>)
-</ol>
-
-</body>
-</html>

Copied: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/addLmsMain_form.zpt (from rev 105002, zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/addLmsMain_form.zpt)
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/addLmsMain_form.zpt	                        (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/addLmsMain_form.zpt	2009-10-10 14:02:56 UTC (rev 105004)
@@ -0,0 +1,14 @@
+<html>
+<head>
+<title>Add LMS</title>
+</head>
+<body>
+
+  <form action="addLmsMain" method="POST">
+    LMS Id:
+    <input type="text" name="id" /> <br />
+    <input type="submit" value="Add LMS" />
+  </form>
+
+</body>
+</html>

Copied: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/add_book.zpt (from rev 105002, zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/add_book.zpt)
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/add_book.zpt	                        (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/add_book.zpt	2009-10-10 14:02:56 UTC (rev 105004)
@@ -0,0 +1,20 @@
+<html>
+<head>
+<title>Welcome to LMS!</title>
+</head>
+<body>
+
+<h1>Add Book</h1>
+
+  <form action="insert_book" method="POST">
+    Barcode:
+    <input type="text" name="barcode" /> <br />
+    Book Title:
+    <input type="text" name="title" /> <br />
+    Book Author:
+    <input type="text" name="author" /> <br />
+    <input type="submit" value="Add Book" />
+  </form>
+
+</body>
+</html>

Copied: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/index_html.zpt (from rev 105002, zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt)
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/index_html.zpt	                        (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/index_html.zpt	2009-10-10 14:02:56 UTC (rev 105004)
@@ -0,0 +1,14 @@
+<html>
+<head>
+<title>Welcome to LMS!</title>
+</head>
+<body>
+
+<h1>Welcome to LMS!</h1>
+
+<a href="add_book">Add Book</a> <br />
+
+<a href="show_books">Show Books</a>
+
+</body>
+</html>

Copied: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/show_books.zpt (from rev 105002, zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/show_books.zpt)
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/show_books.zpt	                        (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage9/lms.main/src/lms/main/zpts/show_books.zpt	2009-10-10 14:02:56 UTC (rev 105004)
@@ -0,0 +1,16 @@
+<html>
+<head>
+<title>Welcome to LMS!</title>
+</head>
+<body>
+
+<h1>Show Books</h1>
+
+<ol tal:repeat="item context/books/objectValues">
+  <td tal:content="item/barcode">Barcode</td>.
+  <td tal:content="item/title">Title</td>
+  (<td tal:content="item/author">Author</td>)
+</ol>
+
+</body>
+</html>



More information about the checkins mailing list