Re: [Zope] how to check if the ResultSet is null?

2000-07-13 Thread Christopher J. Kucera

> Sa wrote:
> 
> Hi, I stuck on a problem: I am creating a registration form. I need to check
> if the person info has already in database. I created a Z SQL method which I
> used "select usr_email from info(table name) where usr_email =  usr_email type=string>" I want to call this method from my dtml method and
> see if it returns "null". But I'm not sure how to implement this. In Java,
> it has ResultSet which I can check if it returns null. I'm not sure how to
> accomplish this in Zope. I could not find relevant document. If you know
> this, could you give me a hand? Thanks!

If your ZSQL Method is named MyMethod:


  You've got some data

  Nothing returned from the SQL


Hope that helps . . .

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] For Newbies Only!

2000-07-13 Thread Christopher J. Kucera

Tim Cook wrote:
> Ok folks if you are like me and not only can't see the light but
> can't even find the path to the light try these things:
> 
> 1. Do the Python tutorial.

Well, I hardly count as a newbie any more, but I'll just add this:
Learning Python was the single most useful thing that helped me grok
Zope.  (Well, I digress. That plus figuring out acquisition.)  It
helped enormously, and despite what others have said, I think it
sheds an amazing amount of light on How Things Work. :)

Just my $0.02.

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Hotfix / 2.2.0 question

2000-07-17 Thread Christopher J. Kucera

Greetings, fellow Zopers!  A quick, non-urgent question for you all:

After recently upgrading to 2.2.0, I noticed that under Control
Panels/Products,
I still had an entry for the security Hotfix from oh, so long ago, despite
the fact that it's quite absent from my 2.2.0 Products directory.  I just
assumed it was safe to delete, so I did, but I'm wondering why it was there,
and if, indeed, I should have deleted it. :)

Thanks for your help,
CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] sequence-item and ""

2000-07-18 Thread Christopher J. Kucera

Diego Rodrigo Neufert wrote:
> 
> Why I cant use dtml-var "sequence-item">??

Because anything inside quotes is evaluated as a Python expression.
It's trying to subtract 'item' from 'sequence.'

Try:



-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Running Zope 2.2 on Solaris 2.7

2000-07-19 Thread Christopher J. Kucera

Andreas Rippel wrote:
> I couldn't add any kind of object, while getting messages like
...
> Error Type: SuperCannotOwn
> Error Value: Objects cannot be owned by the superuser

That's because in Zope 2.2.0, you can't create objects as the superuser.
You'll have to create a user for yourself with the "Manager" role to
add objects. 

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Moving an entire Zope site

2000-08-04 Thread Christopher J. Kucera

Douglas Bates wrote:
> I will be doing a demo of a Zope-based query system at a conference
> soon and need to replicate my entire site on a stand-alone machine.
> Is there a convenient way to archive a Zope site and move it to another
> machine?

Just copy the Data.fs file.  (And any External Methods, etc, you might
be using, of course.)

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Redirecting from Python?

2000-08-04 Thread Christopher J. Kucera

Greetings!

I'm working on a Product, and I'd like to be able to do a RESPONSE.redirect()
from inside the Python code.  What I had was basically this:


  View the page . . .

  


This works fine, but rather than having that sitting out in DTML-land,
I figured I could put the conditions in the Python code and simplify
the if statement, so all I'd have to do is:


  View the page . . .


The Python code I was hoping would accomplish this was:

def someConditions(self):
  if (some number of conditions):
return 1
  else:
self.REQUEST.RESPONSE.redirect('blahblahblah')

My problem is that the redirect just doesn't happen.  I've had this
function return values and the like, so I know it's parsing my conditions
correctly, and I can even do a "return self.REQUEST.RESPONSE.redirect" and
have the function returned back into my page, but it won't actually
redirect.

Any ideas?  Thanks in advance . . .

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Redirecting from Python?

2000-08-04 Thread Christopher J. Kucera

Jonothan Farr wrote:
> Are you doing a dtml-var or dtml-call to call your external method? I believe
> you need a dtml-call.

I've tried both. :)  Other things I've tried:
  * Explicitly passing in the REQUEST object
  * Explicitly passing in the RESPONSE object
  * slapping a "return" in front of the call

Also, it's not really an external method . . .  It's a method
defined in the product's class.  (Perhaps that's significant somehow.)

Thanks for the info, though . . . :)
-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Powered by Zope in different colors?

2000-08-04 Thread Christopher J. Kucera

Marcin Kasperski wrote:
> Has anyone considered preparing some collection of differently colorized
> and sized 'Powered by Zope' logos? Recently I wanted to put it on two

I just created a few that would probably work well with your sites:

http://www.zope.org/Members/cyborg/icons

One is just a plain inverse of the standard, and the other translated
the color into blue . . .

Hope those help!

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Redirecting from Python?

2000-08-04 Thread Christopher J. Kucera

Christian Scholz wrote:
> You actually should use something like this:
> 
> raise 'Redirect','http://my.server/my/path'

Ah yes!  This works wonderfully.  Thanks much! :)

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] 1000-record limit?

2000-09-26 Thread Christopher J. Kucera

Greetings!

I know I saw this discussed a long time ago, but I completely failed
to find the thread anywhere, so here goes . . .

We're running a somewhat older release of Zope with ZOracleDA, and
we've run up against a 1000-record limit when returning data for
reports, etc.  I know that this is intended behavior (careful_range
in DT_Util.py), but I'm wondering what the reasoning is, and if I
should be even considering playing around with this (I'm assuming
it was put in there for *some* reason . . . :)

Thanks in advance for your help!
-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] 1000-record limit?

2000-09-26 Thread Christopher J. Kucera

D'oh . . .

The sad part is that I remember now that I've actually
*done* that before.  :P  Next time I'll try getting some
sleep before I send out an email like that. :)

Thanks for the help!
-CJ

Petru Paler wrote:
> 
> On Tue, 26 Sep 2000, Christopher J. Kucera wrote:
> 
> > We're running a somewhat older release of Zope with ZOracleDA, and
> > we've run up against a 1000-record limit when returning data for
> > reports, etc.  I know that this is intended behavior (careful_range
> > in DT_Util.py), but I'm wondering what the reasoning is, and if I
> > should be even considering playing around with this (I'm assuming
> > it was put in there for *some* reason . . . :)
> 
> Take a look at the "Advanced" tab of your SQL methods...

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] (Off-Topic) A Haiku

2000-10-09 Thread Christopher J. Kucera

A thousand apologies for such blatantly offtopic drivel, but this
leaped into my mind today and I figured if anyone could appreciate
it, it'd be somebody on this list.

  a haiku:

   request bracket tick
base zero tick bracket plus
  tick slash manage tick

(Apply capitalizations and numeric conversions where appropriate.)

Back to your regularly scheduled list . . .
-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] How to display PDF files

2000-10-30 Thread Christopher J. Kucera

Alan Johnston wrote:
> One (apparently simple) thing I cannot find a way to do is link to a PDF
> file.  I believe that everything ZServer serves up must come from the Zope
> Object Database (right? wrong?).  At any rate, how do you get ZServer to
> send a 'raw' PDF file to the browser so that the browser's Acrobat plug-in
> can display it?  I tried creating 'File' and 'Image' objects.  That's
> obviously not it.

Actually, "File" should be okay . . .  Just click on "Browse" and
select the PDF from your hard drive, and it will upload the PDF into
ZODB and spit it back out properly . . .

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Re:GoLive

2000-11-01 Thread Christopher J. Kucera

tom smith wrote:
> I think there's a trick where dtml files can be saved as index.html,
> and then you create a method that redirects index_html or
> /whatever/wherever/ to index.html in the same folder, but I'm not
> sure how to do that.

That should be pretty easy . . .  Zope will let you add objects that
have dots in the titles, so just put a method "index_html" in the
root folder which has the following line:

  

Then wherever there is "index.html", it will be displayed as the
default document (go Acquisition!).

Note that using a ".html" in files will make things a bit tricky
sometimes when coding Python statements, because in python, "index.html"
is looking for a property (or whatever) "html" in the object "index,"
which isn't going to exist, so you've got to be a bit cagey . . .

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Mirroring Zope sites

2000-11-06 Thread Christopher J. Kucera

Hello,

I'd like to be able to take a "snapshot" of a Zope site (probably using
the recursive "wget") so that it can be served from Apache alone. 
I'm running into problems coping with files named "x_html" (most notably
"index_html") . . .  Apache serves up the files as plaintext, so you
just get the HTML in your browser window.

I've been messing around with srm.conf in my Apache configuration to
try and accept "_html" as a valid extention for "text/html" files,
but to no avail.

Has anyone managed to get Apache to serve "_html" as text/html?

Thanks much!
-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Problems using M18

2000-11-20 Thread Christopher J. Kucera

Andreas Tille wrote:
> I just gived Mozilla M18 a try and noticed that  Button of the
> browser doesn't work in zopĆ¼e management screen.  Netscape 4.75 (and

Actually, that seems to be a problem with M18 and Frames in general.
Sometimes it works, sometimes it doesn't.  I'm guessing this is already
in Bugzilla somewhere . . .  You'd best search there first. :)

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Really dumb newbie question

2000-05-23 Thread Christopher J. Kucera

> 
> blah
> 


  blah


Things inside quotes get evaluated as Python expressions. :)

Have fun Zopeing!

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Q: Namespace, Acquisition, and Properties

2000-06-05 Thread Christopher J. Kucera

> Wilkinson Charlie E wrote:
> In the top level folder (root) I have a dtml method title template
> that contains html code and dtml vars that are (intended to be)
> populated by properties of various subfolders as well as a value or
> two passed directly.  The title template is "called" from dtml
> methods in the root and sub-folders using something like:
> 
> 

Chances are, you're losing your namespace.  When you call another method
in quotes, you tend to lose a lot of information unless you use the cryptic:



or:



I'm guessing this'll fix it for you. :)

Good luck!

(Oh, and try not to post HTML to the list . . .)

-CJ

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Costs of implementation

2000-06-13 Thread Christopher J. Kucera

Well, I'd say that much of it relies on the kind of project you're
doing, too.  Sure, if all your DTML is doing is simple if/then
statements, maybe a loop or two, it'll only take a few minutes to
get used to the management interface itself.

However, if you've got some seriously complicated things going on,
it will be a lot more difficult.  We've got an application framework
being developed that relies very heavily on some extraordinarily tricky
acquisition to get pages to render correctly.  Everything is determined
by the path you take to actually get to the page you want to look at,
so a difference of one directory being present in the acquisition path
can *drastically* alter how a page is displayed and functions (just adding
the "admin" folder, for instance).  Everything's automatically rendered.
You basically never have to touch HTML again, because there's all these
Widgets all over the place doing everything for you.  Expecting someone
to just jump into that kind of thing after becoming comfortable with
the management interface would be insane.  (Once you're into the Zen
of the thing, though, it's wonderful!)

If you're just putting together some relatively simple webapps, your
timeline's probably all right.  However, if you want a fully-functional
ZCommerce site up, running, *secure,* and easily expandable, I'd say
there's a lot more you've got to get through. :)

Just my opinion, though.  Perhaps I'm just slow. :)

Happy Zoping!
-CJ

"J. Atwood" wrote:
> 
> Well, if you added it all up I was talking about 96 hours of development (8
> days x 12 hours) which is a lot to bring up a site in Zope. I agree it does
> depend on the person but I have had graphics people once given a 10 minute
> intro to Zope not only start playing around with DTML but doing quick
> if/then statements. OO helps, and Python can help but some of things are not
> exactly the same as Python and TOO much Python can hurt.
> 
> I wise man once said..
> 
> "There are only three timelines for programmers:
> 
> 1) Something that can be done in 20 minutes
> 2) Something that can be done in a  day
> 3) Something that can be done in a year"
> 
> J
> 
> > From: Dan Rusch <[EMAIL PROTECTED]>
> > Date: Tue, 13 Jun 2000 10:36:16 -0500
> > To: "J. Atwood" <[EMAIL PROTECTED]>
> > Cc: D Swart <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL PROTECTED]
> > Subject: Re: [Zope] Costs of implementation
> >
> > I think that the timeline J provided is unrealistically optimistic. The amount
> > of time it will take someone to go from 0 to Zope varies wildly. We have had
> > developers come in and in a matter of a few days they are very productive.
> > Others take much longer. Several things affect this. Someone to show you the
> > ropes being primary. Previous knowledge, especially in OOP and in python or
> > pythonish language, is also crucial.
> >
> > So how long depends on you. If you don't have someone who knows Zope and
> > python
> > expect to struggle up the near vertical learning curve of Zope. After helping
> > to train several people on Zope I would recommend not reading any Zope
> > documentation until after you understand python. In other words, learn the
> > basics of python first. Know what a list, dictionary and tuple are and their
> > syntax and operations and many of the mysteries of Zope will be cleared up
> > (i.e. when do you need tics instead of quotes etc.). After garnishing a
> > working
> > knowledge (you don't need to be a Zen master of python) of python ,then read
> > the Zope documentation and start working in Zope.
> >
> > Just my experience working with newbies.
> >
> > Dan
> >
> > "J. Atwood" wrote:
> >
> >> At 8:32 AM +0200 6/13/2000, D Swart wrote:
> >>> I am trying to motivate the use of Zope / Zcommerce, and to do this need
> >>> some timing ideas - Does anyone have thoughts on how long (man hours per
> >>> expertise) it took them to go from no Zope to (Zope + Steve Spickelmire and
> >>> Co's EMarket) and to a successful transaction?
> >>
> >> From 0 to Zope in under 6.2 seconds! :)
> >>
> >> If you are totally new (no Zope in your blood) here is what I would
> >> expect. This does take into account that you know "something" about
> >> programming and variables and really good HTML as well as some server
> >> stuff (how to set up, IP addresses, shell scripts). I have put what
> >> it would take a Zopista in parenthesis (not me though, I only play
> >> one on the web).
> >>
> >> 1 day (1 hour) - Install Zope
> >> 1 day (done) - Download, print, read all guides and "howtos"
> >> 5 Days (2 days) - To get a basic site up and running. Log in, look
> >> and feel, tested, management, feel the power of Zope
> >> 1 day (2 hours) - Set up database backend and connect
> >> 5 days (2 days) - Build catalog system, Z SQL Methods, etc
> >> 2 days (2 days) - testing, testing, testing
> >>
> >> This is very rough but should be around the amount of time. This does
> >> mean full "developing days" which are about 10-14 hours. I don't