Zope, PostgreSQL 6.5, and some newbie questions
Ok, after fiddling around with zope of a month or so I've finally started to build something. Basically it tracks software/hardware bugs/mods in a PostgreSQL backend database. (I'm using a brand new PostgreSQL 6.5 build, which works fine, if anyone cares). After a day of coding I've got insert and view pages and a whole bunch of issues/observations/questions. Here goes. Sorry it is so long. I've been kind of saving up questions. 0) Zope looks awesome. Time will tell. 1) Is there an easy way to see error messages? Netscape (3.0) won't show me the source of a frame that had an error, so to see the stack trace I need to use lynx and backslash. 2) I want a basic view table/edit/update/delete interface to the underlying tables. The Z Search interface + Z SQL method woks ok for queries but doesn't provide much support for edits/deletes. Am I missing something or do I have to roll my own forms? 3) In order to keep the DTML uncluttered, I've created dtml methods to render things like HTML selections. Two questions.: First, how do I access them if I move them to a subfolder in the same folder as the dtml document? Second, how do I pass parameters to the dtml methods? 4) Can Z SQL methods return anything? After an insert I'd like to get some more information. 5) I've got the select (easy) and insert (too much typing!) working, next I need to do an update. For this I need to do a select using a key, get the current values of the row, set all the text areas and selects to the current values, render the form, and then set up the target dtml document to do the update. Is there an example of this anywhere? Or a product to do it automagically? 6) How the heck do I set up a back button. PARENTS[1] doesn't seem to do it. Thanks in advance, -- cary Cary O'Brien
At 05:04 PM 6/15/99 -0400, Cary O'Brien wrote:
1) Is there an easy way to see error messages? Netscape (3.0) won't show me the source of a frame that had an error, so to see the stack trace I need to use lynx and backslash.
In NS 3 under Win95, here's the way to see the source: * Left-click on the frame * Pull down "View" and select Frame Source * When the source appears, hit Ctrl-R to reload the frame and display the current source. If you don't do this, NS uses the last non-error-inducing, cached version of that URL. If you leave the source frame open, you can just keep hitting Ctrl-R to refresh it until the traceback goes away and your page works again. :) I do suggest upgrading to a 4.x version, however, as this process is a few less steps. You also may want to look at adding a BOBO_HIDE_TRACEBACKS setting to your Zope setup so that it will show the tracebacks in plain text.
3) In order to keep the DTML uncluttered, I've created dtml methods to render things like HTML selections. Two questions.: First, how do I access them if I move them to a subfolder in the same folder as the dtml document?
<!--#with subfolder--><!--#var method--><!--#/with--> Or: <!--#var "_.render(subfolder.method)"-->
Second, how do I pass parameters to the dtml methods?
<!--#with subfolder--> <!--#var "method(None,_,var1=val,var2=val)"--> <!--#/with-->
6) How the heck do I set up a back button. PARENTS[1] doesn't seem to do it.
URL1 could give you an "up" URL. PARENTS[1] would give you an object "above" you. If you want "back" in the sense of "page that linked to this one", use HTTP_REFERER. However, that's not recommended as then that leads to a two-page loop. Instead, suggest your user use their browser's back button, or if you absolutely must have that functionality, access it with JavaScript.
participants (2)
-
Cary O'Brien -
Phillip J. Eby