[Checkins] SVN: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/ bit advanced view
Baiju M
baiju.m.mail at gmail.com
Sat Oct 10 09:47:05 EDT 2009
Log message for revision 105002:
bit advanced view
Changed:
A zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/
A zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/add_book.zpt
D zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/app.py
A zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/app.py
A zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/book.py
D zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt
A zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt
A zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/show_books.zpt
-=-
Copied: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/add_book.zpt (from rev 105000, zope2docs/branches/baijum-tutorial/zope2tut/examples/stage7/lms.main/src/lms/main/add_book.zpt)
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/add_book.zpt (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/add_book.zpt 2009-10-10 13:47:05 UTC (rev 105002)
@@ -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>
Deleted: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/app.py
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage7/lms.main/src/lms/main/app.py 2009-10-10 12:34:03 UTC (rev 104995)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/app.py 2009-10-10 13:47:05 UTC (rev 105002)
@@ -1,14 +0,0 @@
-from OFS.Folder import Folder
-from Products.PageTemplates.PageTemplateFile import PageTemplateFile
-
-addLmsMain_form = PageTemplateFile('addLmsMain_form', globals())
-
-def addLmsMain(dispatcher, id):
- """Add LMS"""
- dispatcher._setObject(id, LmsMain(id))
- return "LMS Installed: %s" % id
-
-class LmsMain(Folder):
- meta_type = "LMS"
-
- index_html = PageTemplateFile('index_html', globals())
Copied: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/app.py (from rev 105000, zope2docs/branches/baijum-tutorial/zope2tut/examples/stage7/lms.main/src/lms/main/app.py)
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/app.py (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/app.py 2009-10-10 13:47:05 UTC (rev 105002)
@@ -0,0 +1,39 @@
+from OFS.Folder import Folder
+from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+from lms.main.book import Book
+
+addLmsMain_form = PageTemplateFile('addLmsMain_form', globals())
+
+
+def addLmsMain(dispatcher, id):
+ """Add LMS"""
+ lms = LmsMain(id)
+ lms.manage_addFolder('books')
+ dispatcher._setObject(id, lms)
+ return "LMS Installed: %s" % id
+
+
+class LmsMain(Folder):
+
+ meta_type = "LMS"
+
+ index_html = PageTemplateFile('index_html', globals())
+
+ add_book = PageTemplateFile('add_book', globals())
+
+ show_books = PageTemplateFile('show_books', globals())
+
+ def insert_book(self):
+ """Insert book"""
+ request = self.REQUEST
+
+ barcode = request.form['barcode']
+ title = request.form['title']
+ author = request.form['author']
+
+ book = Book()
+ book.barcode = barcode
+ book.title = title
+ book.author = author
+ self.books._setObject(barcode, book)
+ return "Book added: %s" % barcode
Copied: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/book.py (from rev 105000, zope2docs/branches/baijum-tutorial/zope2tut/examples/stage7/lms.main/src/lms/main/book.py)
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/book.py (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/book.py 2009-10-10 13:47:05 UTC (rev 105002)
@@ -0,0 +1,9 @@
+from OFS.Folder import Folder
+
+class Book(Folder):
+
+ meta_type = "Book"
+
+ barcode = ""
+ title = ""
+ author = ""
Deleted: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage7/lms.main/src/lms/main/index_html.zpt 2009-10-10 12:34:03 UTC (rev 104995)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt 2009-10-10 13:47:05 UTC (rev 105002)
@@ -1,10 +0,0 @@
-<html>
-<head>
-<title>Welcome to LMS!</title>
-</head>
-<body>
-
-<h1>Welcome to LMS!</h1>
-
-</body>
-</html>
Copied: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt (from rev 105000, zope2docs/branches/baijum-tutorial/zope2tut/examples/stage7/lms.main/src/lms/main/index_html.zpt)
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/index_html.zpt 2009-10-10 13:47:05 UTC (rev 105002)
@@ -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>
Added: zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/show_books.zpt
===================================================================
--- zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/show_books.zpt (rev 0)
+++ zope2docs/branches/baijum-tutorial/zope2tut/examples/stage8/lms.main/src/lms/main/show_books.zpt 2009-10-10 13:47:05 UTC (rev 105002)
@@ -0,0 +1,16 @@
+<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>
More information about the checkins
mailing list