Re: [Zope] create a new log file

2005-09-19 Thread Andreas Jung



--On 19. September 2005 19:19:38 +0100 Nuno <[EMAIL PROTECTED]> wrote:


Hi!

How can I create a new log file, e.g. "mylog.log", this is to log
specific jobs in a different log file of "event.log".



I think you can not reuse the zLOG API of Zope for custom logfiles. You 
need to implement your own logging based on the Python 'logging' module. 
Check the Python documentation for information for details.


-aj



pgpae8zkrSBUr.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Getting at third-party modules in dtml?

2005-09-19 Thread Axel Straschil
Hi!

> Say I have a function that I want to make callable in
> my UI. It needs to be globally available, i.e. it needs to
> be callable *without* having an instance of my product yet.
> (This has to do with listing information about all acquirable
> instances of the product, so the user can choose from those
> available.)

In a Product's __init__.py:

def theSecret(self):
return "A hobbit!"

methods = {
'whatIsFrodo':  theSecret
}


Save that i.E. in MyInstance/Products/MyFancy/__init__.py, restart Zope
And than . 

Lg,
AXEL.
-- 
Gentoo? Debian? RedHat? SuSE? *BSD? Stop the distri-war, make little user!

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


[Zope] Getting at third-party modules in dtml?

2005-09-19 Thread Paul Winkler
I've got an ancient DTMLFile UI that I need to add a feature to,
and I really don't want to have to rewrite it all in ZPT today...
I'd love to, just don't have time now...
and there's something I just can't figure out:

Say I have a function that I want to make callable in
my UI. It needs to be globally available, i.e. it needs to
be callable *without* having an instance of my product yet.
(This has to do with listing information about all acquirable
instances of the product, so the user can choose from those
available.)

I can make the security declarations fine, e.g.

ModuleSecurityInfo('Products.MyProduct.utils').declarePublic('getBaz')

 and then I can import and use getBaz() in python Scripts,
and I can use it in ZPT too by doing something like
python:modules['Products.MyProduct.utils'].doBaz()
 but how the heck do I do that in DTML?  There's no "modules"
namespace in DTML anywhere that I can find...

I guess I could wrap the function in an external method. But
since this UI is for a product I maintain, I REALLY do not want to have
to add goofy stuff like that to the installation instructions and make
my users clutter their ZODB with external methods. That's way too
fragile and messy.

Thanks,

PW


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


[Zope] create a new log file

2005-09-19 Thread Nuno
Hi!

How can I create a new log file, e.g. "mylog.log", this is to log
specific jobs in a different log file of "event.log".


Best Regards
Nuno
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] RewriteRule Witch

2005-09-19 Thread Sascha Welter
Hello Zopistas!

Virtual hosting with Zope usually involves setting up Apache "in front"
of Zope, putting a Virtual Host Monster into your Zope Root and
configuring some RewriteRules in your httpd.conf. Since I don't do this
every day (like most zopistas, I guess), every time I have to dig up my
knowledge of rewrite rules again from almost scratch. Now I wrote a
little script to help me with the most frequent cases of those
RewriteRules. You can try out the Rewrite Rule Witch online:
http://betabug.ch/zope/witch

Please note that there might still be bugs and mistakes in there. I'm
happy to receive feedback about this thing. Especially interesting would
be to try out some of the configurations you have and see if the result
is what you actually use. I cover only the most basic variants, but
likely the ones used for 95% of Zope setups. I do not yet cover
rewriting "/manage" URLs to https (next project!)

Regards,

Sascha

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


Θέμα: Re: [Zope] How to show field n ames from sql query?

2005-09-19 Thread Thomas Apostolou
"TestODBCEM" is an external method that uses a python
module with a function named "TestODBCEM". This
function uses the parameters sysDSN, usr, mypass, sSQL
to connect to the sysDSN with user name usr, password
mypass and execute sSQL query. After that it returns
the results witch i show in a table.


--- Tino Wildenhain <[EMAIL PROTECTED]> wrote:

> Thomas Apostolou schrieb:
> > Hello all,
> > i use the following to get to show the results
> from an
> > sql query.
> > What are the expresions to show the field names?
> > 
> > 
> >   
> > 
> >   
> > 
> >   
> > 
> > 
> >   
> > 
> > 
> >   
> > 
> > 
> 
> See:
>
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/RelationalDatabases.stx#3-107
> 
> particulary result.data_dictionary() which gives
> you the names of the columns.
> 
> I'm not sure what you mean with the DSN in your
> example above.
> For me it does not look correct. ZSQL methods
> do not deal with databases and connections directly
> but
> rather use a central connection object.
> 







___ 
Χρησιμοποιείτε Yahoo!; 
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail 
διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών 
μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr 

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


[Zope] How to show field names from sql query?

2005-09-19 Thread Thomas Apostolou
Hello all,
i use the following to get to show the results from an
sql query.
What are the expresions to show the field names?


  

  

  


  


  


Thanks in advance.
Thomas.






___ 
Χρησιμοποιείτε Yahoo!; 
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail 
διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών 
μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr 

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


Re: [Zope] Re: Text field and module import questions

2005-09-19 Thread Ivan Stout
Martijn,
 
Thank you very much. Just as you said, there was a space in between openning and closing tags, but the reason I missed it was because I had indented like the following:_

_ 
since it was part of an if tag block. So I changed it like the following:_ 
Anyway, thanks again. I will pay much closer attention to how I format my code in the future.
 
Cheers.
 
On 9/19/05, Martijn Pieters <[EMAIL PROTECTED]> wrote:
Ivan Stout wrote:> It appears that the text input field I have created using a dtml method> has a default space character when you click in the field. Is there a
> way to get rid of this?Depends on the HTML used; this is really a HTML question more than a DTMLquestion.If this is a textarea, make sure there are no spaces between the openingand closing tags:
or, if you fill the textarea from with a dtml attribute, eliminate thespaces there too:&dtml-variablename;
If you need multiple lines to avoid excessive wrapping or scrolling, putthe angle brackets on a new line to eliminate whitespace (newlines arewhitespace too!):  >  >If you used an input tag, the same applies, but now to whitespace betweenthe quotes of the value attribute.Martijn Pieters___
Zope maillist  -  Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope**   No cross posts or HTML encoding!  **
(Related lists -http://mail.zope.org/mailman/listinfo/zope-announcehttp://mail.zope.org/mailman/listinfo/zope-dev
 )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Text field and module import questions

2005-09-19 Thread Martijn Pieters
Ivan Stout wrote:
> It appears that the text input field I have created using a dtml method
> has a default space character when you click in the field. Is there a
> way to get rid of this?

Depends on the HTML used; this is really a HTML question more than a DTML
question.

If this is a textarea, make sure there are no spaces between the opening
and closing tags:

  

or, if you fill the textarea from with a dtml attribute, eliminate the
spaces there too:

  &dtml-variablename;
  
If you need multiple lines to avoid excessive wrapping or scrolling, put
the angle brackets on a new line to eliminate whitespace (newlines are
whitespace too!):

  

If you used an input tag, the same applies, but now to whitespace between
the quotes of the value attribute.

Martijn Pieters


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


[Zope] Re: Help with virtual hosting Zope on different ports

2005-09-19 Thread Michael Sanborn
I've found where this topic is covered in "The Definitive Guide to
Plone" (pp. 292-303) and have installed Virtual Host Monsters in both
Zope instances. I still have some questions about how to edit
httpd.conf, but since that's just an Apache issue, I'll sign off with
a "Neve Mid..."
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )