Home arrow Zope arrow Page 7 - Zope And MySQL

Submitting To The King - Zope

It might seem intimidating, but hooking Zope up to a MySQL database is easier than you think. And once you've got the two talking nice to each other, it becomes even simpler to create dynamic, Zope-based Web applications. Take a look.

TABLE OF CONTENTS:
  1. Zope And MySQL
  2. Making The Connection
  3. Adapting To The Environment
  4. The Magic Of The Movies
  5. Visiting The Box Office
  6. Adding Things Up
  7. Submitting To The King
  8. Erasing The Past
  9. Of Methods And Madness
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 27
April 10, 2002

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
If you're familiar with DTML, you'll know that the two objects above can be combined into a single one by creative use of an "if" conditional test keyed to the form's "submit" variable. And that's exactly what I've done next - a DTML Method named "add" which includes both the initial form and the form processor.

<dtml-var standard_html_header> <dtml-if submit> <dtml-call insertMethod> <h2>Item added!</h2> <p> <a href="list">View the entire collection</a> or <a href="add">add another title</a> <dtml-else> <h2>Add DVD</h2> <form action="add" method="POST"> <table border=0> <tr> <td>Title</td> <td><input name="title" width=30 value=""></td> </tr> <tr> <td>Director</td> <td><input name="director" width=30 value=""></td> </tr> <tr> <td>Cast</td> <td><input name="cast" width=30 value=""></td> </tr> <tr> <td>Genre</td> <td><input name="genre" width=30 value=""></td> </tr> <tr> <td colspan=2 align=center> <input type="submit" name="submit" value="Add DVD"> </td> </tr> </table> </form> </dtml-if> <dtml-var standard_html_footer>
Using this two-in-one technique can reduce the number of objects in your collection, and perhaps make things easier on the eyes.

 
 
>>> More Zope Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ZOPE ARTICLES

- Creating Zope Products
- Plone Content Types With Archetypes
- Flat User Management in Zope
- Creating Basic Zope Applications
- Getting started with Zope for Linux and Sola...
- ZPT Basics (part 4)
- ZPT Basics (part 3)
- ZPT Basics (part 2)
- ZPT Basics (part 1)
- Exception Handling In DTML
- DTML Basics (part 4)
- DTML Basics (part 3)
- DTML Basics (part 2)
- DTML Basics (part 1)
- Using Zope With Apache

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: