Re: [Zope] MailHost with SSL

2006-12-07 Thread Ferhat Ayaz
Yes, thanks. You're so adroit. Now my problem is solved.
Now I have the punch line and know how to use Mail Template with 
SecureMailHost: Do it yourself and never ask for existing solutions. If 
possible invent the wheel again.!
Thanks for your shopping and car examples :)

Andreas Jung [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 6. Dezember 2006 21:48:24 +0100 Ferhat Ayaz 
 wrote:


 On Dec 6, 2006, at 9:38 PM, Andreas Jung wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1



 - --On 6. Dezember 2006 20:21:19 +0100 Ferhat Ayaz
  wrote:

 Oh, you should belive me. It appears just 'after' adding
 SecureMailHost
 to the Folder. (I'm not coding, just adding new Zope Object via
 management Interface)
 After then you can configure user/password.

 Where is the problem? You also don't have to fill in your
 creditcard number
 first when entering an online shop.

 With MailHost, you can do it! I'm _configuring_ a  server (in this case
 my MailHost)  but not _buy_ a server.

You did not get the punch line :-)


 The dropdownmenu shows only the old
 MailHost and not the new added SecureMailHost instance while
 configuring
 the Mail Template

 Likely you have to massage the code in order to check for the
 'meta_type'
 of the SecureMailHost instead of the 'meta_type' for the standard Zope
 Mailhost. Reading and analyzing the code is always a good idea to
 track
 down such issues. I am pretty sure that there is some code using
 superValues() -
 grep -r  is your best friend in such a case.


 hmm. Ok, thanks. I thought it will much eleganter to ask for some
 experience. I want use the product and not refactor the code.


Modifying likely one line of code is elegant enough. If you want a better 
car you have to pimp it. If you can't pimp it yourself: either don't try it 
or let someone else pimp it for you. Got the punch line now?

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFd6rICJIWIbr9KYwRAi7PAJ9ZJFmcumI9/Xng7MyPEN8FUjVGJACfdSDT
xTeRJnsvJo0J/oIssU+1IIU=
=R65g
-END 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 )


 
-
Everyone is raving about the all-new Yahoo! Mail beta.___
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] Simple Question

2006-12-07 Thread Ferhat Ayaz


Read the template script when adding new Script(Python)


On Dec 7, 2006, at 7:53 PM, Nancy Donnelly wrote:


107106
Hi;
The following doesn't work in a Script (Python), presumably because  
I can't quote html:


print 
htmlbodyHello, world!/body/html

return printed

What should I use instead?
TIA,
Nancy

Want to start your own business? Learn how on Yahoo! Small Business.
___
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 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] MailHost with SSL

2006-12-06 Thread Ferhat Ayaz
Oh, you should belive me. It appears just 'after' adding  
SecureMailHost to the Folder. (I'm not coding, just adding new Zope  
Object via management Interface) After then you can configure user/ 
password.
But this was not, what I was looking for, becaus I was not able to  
bind it with my existing Mail Template. The dropdownmenu shows only  
the old MailHost and not the new added SecureMailHost instance while  
configuring the Mail Template


Greets,
Ferhat

On Dec 6, 2006, at 6:25 AM, Andreas Jung wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 5. Dezember 2006 22:18:09 +0100 Ferhat Ayaz
[EMAIL PROTECTED] wrote:

I've installed it. But there is no way to set user/password. At  
least I

didn't found anyway.




We don't believe that. The API tells you clearly that the constructors
accepts a username and a password. Triple check yourself.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFdlQuCJIWIbr9KYwRAtM7AKCh8eUNgB1/6rauXeIXB4y8WqOfgQCfS4tF
62MPlv8vSqkoPjRk+/Ovn1c=
=9ik5
-END 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 )


Re: [Zope] MailHost with SSL

2006-12-06 Thread Ferhat Ayaz


On Dec 6, 2006, at 9:38 PM, Andreas Jung wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 6. Dezember 2006 20:21:19 +0100 Ferhat Ayaz
[EMAIL PROTECTED] wrote:

Oh, you should belive me. It appears just 'after' adding  
SecureMailHost

to the Folder. (I'm not coding, just adding new Zope Object via
management Interface)
After then you can configure user/password.


Where is the problem? You also don't have to fill in your  
creditcard number

first when entering an online shop.


With MailHost, you can do it! I'm _configuring_ a  server (in this  
case my MailHost)  but not _buy_ a server.




But this was not, what I was looking for, becaus I was not able to  
bind

it with my existing Mail Template.


No idea what Mail template means for you? You mean the product of  
Chris

Withers?


Yes, indeed.



The dropdownmenu shows only the old
MailHost and not the new added SecureMailHost instance while  
configuring

the Mail Template


Likely you have to massage the code in order to check for the  
'meta_type'

of the SecureMailHost instead of the 'meta_type' for the standard Zope
Mailhost. Reading and analyzing the code is always a good idea to  
track

down such issues. I am pretty sure that there is some code using
superValues() -
grep -r  is your best friend in such a case.



hmm. Ok, thanks. I thought it will much eleganter to ask for some  
experience. I want use the product and not refactor the code.


Greets,
Ferhat


___
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] MailHost with SSL

2006-12-05 Thread Ferhat Ayaz
I've installed it. But there is no way to set user/password. At least  
I didn't found anyway.



On Dec 5, 2006, at 10:15 PM, Andreas Jung wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 5. Dezember 2006 20:31:21 +0100 Ferhat Ayaz
[EMAIL PROTECTED] wrote:


Hello,

is it possible to connect a ssl crypted smtp server like  
googlemail with

MailHost?



Look at SecureMailHost which is part of Plone.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFdeF2CJIWIbr9KYwRApnEAKCeUb6MRgpCAEP8pMDN6BVwfZbtRQCePSyd
kPP1MzfWm/HGRf0S8Go/DpQ=
=dHz5
-END 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 )


Re: [Zope] cannot import name SUPPORTS_WEBDAV_LOCKS

2006-10-21 Thread Ferhat Ayaz

 And it is a known fact that export/import is only
 support between
 *identical* Zope and Product versions...so basically
 your usecase
 is unsupported.

oh. Ok I didn't know this fact. thanks

Here is the traceback
--
2006-10-20T23:36:35 ERROR Zope.SiteErrorLog
http://localhost:8080/manage_importObject
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module OFS.ObjectManager, line 609, in
manage_importObject
  Module OFS.ObjectManager, line 626, in
_importObjectFromFile
  Module ZODB.ExportImport, line 75, in importFile
  Module transaction._transaction, line 312, in
savepoint
  Module transaction._transaction, line 309, in
savepoint
  Module transaction._transaction, line 737, in
__init__
  Module ZODB.Connection, line 1034, in savepoint
  Module ZODB.Connection, line 507, in _commit
  Module ZODB.ExportImport, line 143, in
_importDuringCommit
  Module None, line 9, in ?
  Module None, line 12, in ?
ImportError: cannot import name SUPPORTS_WEBDAV_LOCKS

--- Andreas Jung [EMAIL PROTECTED] wrote:

 
 
 --On 20. Oktober 2006 13:07:29 -0700 Ferhat Ayaz
 [EMAIL PROTECTED] 
 wrote:
 
 
  Hi,
 
  after upgrading from Zope 2.9.4-final to
 Zope-2.10.0 I
  have following problem while importing a Folder to
  Zope-2.10.0 which I have exported from Zope
  2.9.4-final.

 
 -aj
 
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] cannot import name SUPPORTS_WEBDAV_LOCKS

2006-10-21 Thread Ferhat Ayaz

Ok. As I understand: It's not possible to import from
2.9.x to 2.10, is it?

--- Andreas Jung [EMAIL PROTECTED] wrote:

 
 
 --On 21. Oktober 2006 00:50:20 -0700 Ferhat Ayaz
 [EMAIL PROTECTED] 
 wrote:
 
 
  And it is a known fact that export/import is only
  support between
  *identical* Zope and Product versions...so
 basically
  your usecase
  is unsupported.
 
  oh. Ok I didn't know this fact. thanks
 
 
 SUPPORT_WEBDAV_LOCKS was removed in 2.10. That's why
 it fails.
 But as said the problem is how you are using
 export/import.
 
 -aj


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] cannot import name SUPPORTS_WEBDAV_LOCKS

2006-10-20 Thread Ferhat Ayaz

Hi,

after upgrading from Zope 2.9.4-final to Zope-2.10.0 I
have following problem while importing a Folder to 
Zope-2.10.0 which I have exported from Zope
2.9.4-final.
Do you know where I'm doing something wrong?

Error Type: ImportError
Error Value: cannot import name SUPPORTS_WEBDAV_LOCKS

Thanks,
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] unexpected keyword argument 'error'

2006-09-24 Thread Ferhat Ayaz
Hi,

It's not so difficult to fix it by yourself. Here is
the answer:

http://mail.zope.org/pipermail/zope-collector-monitor/2006-July/006905.html

Greets,
Ferhat




--- Pupeno [EMAIL PROTECTED] wrote:

 Hello,
 I am trying to make a Data.fs file work on my local
 workstation. I've download 
 it from my server. My server runs Debian with
 Python, Zope and Plone 
 installed from sources. My workstation runs Gentoo
 with Python, Zope and 
 Plone installed from ebuild but the same versions as
 on the server:
 Python 2.4.3
 Zope 2.9.4
 Plone 2.5
 
 I've put the Data.fs and started the local Zope. But
 no matter what I try to 
 access I always get the error:
 
 Error Value: _log() got an unexpected keyword
 argument 'error'
 
 The whole error is:
 
 Site Error
 An error was encountered while publishing this
 resource. 
 Error Type: TypeError
  Error Value: _log() got an unexpected keyword
 argument 'error'
  
 Troubleshooting Suggestions
 The URL may be incorrect.
 The parameters passed to this resource may be
 incorrect.
 A resource that this resource relies on may be
 encountering an error.
 For more detailed information about the error,
 please refer to the error log. 
 If the error persists please contact the site
 maintainer. Thank you for your 
 patience. 
 
 and the error.log reveals:
 
 --
 2006-09-24T16:34:06 ERROR Zope.SiteErrorLog
 http://phoenix.pupeno.com:8080
 Traceback (innermost last):
   Module ZPublisher.Publish, line 106, in publish
   Module ZPublisher.BaseRequest, line 275, in
 traverse
   Module ZPublisher.BeforeTraverse, line 108, in
 __call__
   Module logging, line 999, in error
 TypeError: _log() got an unexpected keyword argument
 'error'
 
 I can't find any other useful information. Any ideas
 what the problem might 
 be ?
 
 Thank you.
 -- 
 Pupeno [EMAIL PROTECTED] (http://pupeno.com)
  ___
 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 )
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] VirtualHost 403 Forbidden. Help!!

2006-09-21 Thread Ferhat Ayaz
Hi,

I read every doc I found. But the server reports
always 403 on konfiguring an APache VirtualHost on my
Zope Instance on the same machine. Here my sniplet
from apache2.conf (also known as httpd.conf)


VirtualHost journal.homelinux.net:80
   ServerName journal.homelinux.net
   ServerAdmin [EMAIL PROTECTED]
   RewriteEngine On
   RewriteRule ^/(.*)
http://localhost:8080/VirtualHostBase/http/journal.homelinux.net:80/VirtualHostRoot/$1
[P,L]

   ErrorLog /var/log/apache2/journal-error_log
   TransferLog /var/log/apache2/journal-access_log
/VirtualHost


I tryed many other variants to point to the VH
Monster. 
The result is always:

Forbidden

You don't have permission to access / on this server.


What am I doing wrong?


thanks,
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] VirtualHost 403 Forbidden. Help!!

2006-09-21 Thread Ferhat Ayaz
In the apache logs I found this:

[Thu Sep 21 16:15:58 2006] [error] [client
141.12.190.15] client denied by server configuration:
proxy:http://localhost:8080/VirtualHostBase/http/journal.homelinux.net:80/homelinux.net/VirtualHostRoot


And this is my proxy conf

IfModule mod_proxy.c

#turning ProxyRequests on and allowing
proxying from all may allow
#spammers to use your proxy to send email.

ProxyRequests Off

Proxy *
Order deny,allow
Deny from all
#Allow from .your_domain.com
/Proxy

# Enable/disable the handling of HTTP/1.1
Via: headers.
# (Full adds the server version; Block
removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block

ProxyVia On

# To enable the cache as well, edit and
uncomment the following lines:
# (no cacheing without CacheRoot)

CacheRoot /var/cache/apache2/proxy
CacheSize 5
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
# Again, you probably should change this.
#NoCache a_domain.com another_domain.edu
joes.garage_sale.com

/IfModule


I know...Sorry that this is not a Zope issue directly.
But I think I can find here much more experience with
apache and Zope VirtualHosting as on other lists. 

Greets,
Ferhat


--- Jonathan [EMAIL PROTECTED] wrote:

 
 - Original Message - 
 From: Jonathan [EMAIL PROTECTED]
 To: Ferhat Ayaz [EMAIL PROTECTED];
 zope@zope.org
 Sent: Thursday, September 21, 2006 10:34 AM
 Subject: Re: [Zope] VirtualHost 403 Forbidden.
 Help!!
 
 
 
  - Original Message - 
  From: Ferhat Ayaz [EMAIL PROTECTED]
  To: zope@zope.org
  Sent: Thursday, September 21, 2006 10:20 AM
  Subject: [Zope] VirtualHost 403 Forbidden. Help!!
 
 
  Hi,
 
  I read every doc I found. But the server reports
  always 403 on konfiguring an APache VirtualHost
 on my
  Zope Instance on the same machine. Here my
 sniplet
  from apache2.conf (also known as httpd.conf)
 
 
  VirtualHost journal.homelinux.net:80
ServerName journal.homelinux.net
ServerAdmin [EMAIL PROTECTED]
RewriteEngine On
RewriteRule ^/(.*)
 

http://localhost:8080/VirtualHostBase/http/journal.homelinux.net:80/VirtualHostRoot/$1
  [P,L]
 
ErrorLog /var/log/apache2/journal-error_log
TransferLog
 /var/log/apache2/journal-access_log
  /VirtualHost
 
 
  I tryed many other variants to point to the VH
  Monster.
  The result is always:
 
  Forbidden
 
  You don't have permission to access / on this
 server.
 
 
  What am I doing
 wrong?
 
 
  Is your nameserver configured to allow access to
 journal.homelinux.net?
  (look at /etc/named.conf  and the associated db
 entry in /etc/named)
 
  Can you get to a simple directory on your server? 
 (ie. change the rewrite 
  rule so that it points at a directory on your
 server - create a simple 
  index.html file in the associated htdocs
 subdirectory)
 
 I take this back, the above would be for a 404
 error, probably not your 403 
 error.
 
 Have you check your apache and zope logs?
 
 
 Jonathan 
 
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] VirtualHost 403 Forbidden. Help!!

2006-09-21 Thread Ferhat Ayaz
I'm now able to access the server. with allowing
access from all IPs. But is this the regular way to do
VirtualHosting with Zope??
Here the solution (!?)

Proxy *
Allow from all
/Proxy


--- Jonathan [EMAIL PROTECTED] wrote:

 
 - Original Message - 
 From: Jonathan [EMAIL PROTECTED]
 To: Ferhat Ayaz [EMAIL PROTECTED];
 zope@zope.org
 Sent: Thursday, September 21, 2006 10:34 AM
 Subject: Re: [Zope] VirtualHost 403 Forbidden.
 Help!!
 
 
 
  - Original Message - 
  From: Ferhat Ayaz [EMAIL PROTECTED]
  To: zope@zope.org
  Sent: Thursday, September 21, 2006 10:20 AM
  Subject: [Zope] VirtualHost 403 Forbidden. Help!!
 
 
  Hi,
 
  I read every doc I found. But the server reports
  always 403 on konfiguring an APache VirtualHost
 on my
  Zope Instance on the same machine. Here my
 sniplet
  from apache2.conf (also known as httpd.conf)
 
 
  VirtualHost journal.homelinux.net:80
ServerName journal.homelinux.net
ServerAdmin [EMAIL PROTECTED]
RewriteEngine On
RewriteRule ^/(.*)
 

http://localhost:8080/VirtualHostBase/http/journal.homelinux.net:80/VirtualHostRoot/$1
  [P,L]
 
ErrorLog /var/log/apache2/journal-error_log
TransferLog
 /var/log/apache2/journal-access_log
  /VirtualHost
 
 
  I tryed many other variants to point to the VH
  Monster.
  The result is always:
 
  Forbidden
 
  You don't have permission to access / on this
 server.
 
 
  What am I doing
 wrong?
 
 
  Is your nameserver configured to allow access to
 journal.homelinux.net?
  (look at /etc/named.conf  and the associated db
 entry in /etc/named)
 
  Can you get to a simple directory on your server? 
 (ie. change the rewrite 
  rule so that it points at a directory on your
 server - create a simple 
  index.html file in the associated htdocs
 subdirectory)
 
 I take this back, the above would be for a 404
 error, probably not your 403 
 error.
 
 Have you check your apache and zope logs?
 
 
 Jonathan 
 
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] VirtualHost 403 Forbidden. Help!!

2006-09-21 Thread Ferhat Ayaz
I run the apache and zope server on the same machine.
Turning 'Off' ProxyVia and Deny from all produces the
same problem: 403 Forbidden.
I don't understand, why the proxy deny my remote IP. I
think the apache server on the localhost 127.0.0.1
should call the proxy and I do my request to apache.
Or is this wrong?

Thanks,
Ferhat


--- KE Liew [EMAIL PROTECTED] wrote:

 Turn off ProxyVia, and leave everything to default,
 especially
 
Proxy *
Order deny,allow
Deny from all
#Allow from .your_domain.com
/Proxy
 
 You don't want everyone to use your server as a
 proxy. That can be bad.
 
 
 On 9/21/06, Ferhat Ayaz [EMAIL PROTECTED]
 wrote:
  In the apache logs I found this:
 
  [Thu Sep 21 16:15:58 2006] [error] [client
  141.12.190.15] client denied by server
 configuration:
 

proxy:http://localhost:8080/VirtualHostBase/http/journal.homelinux.net:80/homelinux.net/VirtualHostRoot
 
 
  And this is my proxy conf
 
  IfModule mod_proxy.c
 
  #turning ProxyRequests on and allowing
  proxying from all may allow
  #spammers to use your proxy to send email.
 
  ProxyRequests Off
 
  Proxy *
  Order deny,allow
  Deny from all
  #Allow from .your_domain.com
  /Proxy
 
  # Enable/disable the handling of HTTP/1.1
  Via: headers.
  # (Full adds the server version; Block
  removes all outgoing Via: headers)
  # Set to one of: Off | On | Full | Block
 
  ProxyVia On
 
  # To enable the cache as well, edit and
  uncomment the following lines:
  # (no cacheing without CacheRoot)
 
  CacheRoot /var/cache/apache2/proxy
  CacheSize 5
  CacheGcInterval 4
  CacheMaxExpire 24
  CacheLastModifiedFactor 0.1
  CacheDefaultExpire 1
  # Again, you probably should change this.
  #NoCache a_domain.com another_domain.edu
  joes.garage_sale.com
 
  /IfModule
 
 
  I know...Sorry that this is not a Zope issue
 directly.
  But I think I can find here much more experience
 with
  apache and Zope VirtualHosting as on other lists.
 
  Greets,
  Ferhat
 
 
  --- Jonathan [EMAIL PROTECTED] wrote:
 
  
   - Original Message -
   From: Jonathan [EMAIL PROTECTED]
   To: Ferhat Ayaz [EMAIL PROTECTED];
   zope@zope.org
   Sent: Thursday, September 21, 2006 10:34 AM
   Subject: Re: [Zope] VirtualHost 403 Forbidden.
   Help!!
  
  
   
- Original Message -
From: Ferhat Ayaz [EMAIL PROTECTED]
To: zope@zope.org
Sent: Thursday, September 21, 2006 10:20 AM
Subject: [Zope] VirtualHost 403 Forbidden.
 Help!!
   
   
Hi,
   
I read every doc I found. But the server
 reports
always 403 on konfiguring an APache
 VirtualHost
   on my
Zope Instance on the same machine. Here my
   sniplet
from apache2.conf (also known as httpd.conf)
   
   
VirtualHost journal.homelinux.net:80
  ServerName journal.homelinux.net
  ServerAdmin [EMAIL PROTECTED]
  RewriteEngine On
  RewriteRule ^/(.*)
   
  
 

http://localhost:8080/VirtualHostBase/http/journal.homelinux.net:80/VirtualHostRoot/$1
[P,L]
   
  ErrorLog
 /var/log/apache2/journal-error_log
  TransferLog
   /var/log/apache2/journal-access_log
/VirtualHost
   
   
I tryed many other variants to point to the
 VH
Monster.
The result is always:
   
Forbidden
   
You don't have permission to access / on this
   server.
   
   
What am I doing
   wrong?
   
   
Is your nameserver configured to allow access
 to
   journal.homelinux.net?
(look at /etc/named.conf  and the associated
 db
   entry in /etc/named)
   
Can you get to a simple directory on your
 server?
   (ie. change the rewrite
rule so that it points at a directory on your
   server - create a simple
index.html file in the associated htdocs
   subdirectory)
  
   I take this back, the above would be for a 404
   error, probably not your 403
   error.
  
   Have you check your apache and zope logs?
  
  
   Jonathan
  
  
  
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
  ___
  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 )
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists

Re: [Zope] VirtualHost 403 Forbidden. Help!!

2006-09-21 Thread Ferhat Ayaz
Disabling all proxy options worked for me too. I'm not
sure if this will disable also all proxy restrictions.

But I think I can live with this configuration for a
while. Thanks.



--- Jonathan [EMAIL PROTECTED] wrote:

 
 - Original Message - 
 From: Ferhat Ayaz [EMAIL PROTECTED]
 To: zope@zope.org
 Sent: Thursday, September 21, 2006 12:54 PM
 Subject: Re: [Zope] VirtualHost 403 Forbidden.
 Help!!
 
 
 I run the apache and zope server on the same
 machine.
  Turning 'Off' ProxyVia and Deny from all produces
 the
  same problem: 403 Forbidden.
  I don't understand, why the proxy deny my remote
 IP. I
  think the apache server on the localhost 127.0.0.1
  should call the proxy and I do my request to
 apache.
  Or is this wrong?
 
 Following is an extract from our httpd.conf file:
 
 #
 # Proxy Server directives. Uncomment the following
 lines to
 # enable the proxy server:
 #
 #IfModule mod_proxy.c
 #ProxyRequests On
 #
 #Proxy *
 #Order deny,allow
 #Deny from all
 #Allow from .your-domain.com
 #/Proxy
 #
 # Enable/disable the handling of HTTP/1.1 Via:
 headers.
 # (Full adds the server version; Block removes
 all outgoing Via: 
 headers)
 # Set to one of: Off | On | Full | Block
 #
 #ProxyVia On
 #
 # To enable the cache as well, edit and uncomment
 the following lines:
 # (no cacheing without CacheRoot)
 #
 #CacheRoot /etc/httpd/proxy
 #CacheSize 5
 #CacheGcInterval 4
 #CacheMaxExpire 24
 #CacheLastModifiedFactor 0.1
 #CacheDefaultExpire 1
 #NoCache a-domain.com another-domain.edu
 joes.garage-sale.com
 #/IfModule
 # End of proxy directives.
 
 As you can see all of the proxy directives have been
 'disabled'.
 Here are a couple of examples from the virtual host
 configuration section of 
 httpd.conf:
 
 
 RewriteEngine on
 RewriteRule manage - [F]
 RewriteRule ^/(.*) 

http://localhost:8080/VirtualHostBase/http/www.shopwiser.com:80/sw/VirtualHostRoot/$1
 
 [L,P]
 
 VirtualHost www.frapped.com:80
 ServerName www.frapped.com
 ServerAdmin [EMAIL PROTECTED]
 ErrorLog logs/frapped_error_log
 CustomLog logs/frapped_access_log common
 RewriteRule ^/(.*) 

http://localhost:8080/VirtualHostBase/http/www.frapped.com:80/Wet/VirtualHostRoot/$1
 
 [L,P]
 /VirtualHost
 
 
 NameVirtualHost 206.191.24.30
 VirtualHost 206.191.24.30:80
 ServerName www.cozumo.net
 ErrorLog logs/cozumo_error_log
 CustomLog logs/cozumo_access_log common
 RewriteEngine on
 RewriteRule ^/(.*) 

http://localhost:8081/VirtualHostBase/http/www.cozumo.net:80/Coz/CurrentVersion/WUI/VirtualHostRoot/$1
 
 [L,P]
 /VirtualHost
 
 
 This setup works for us!
 
 
 Jonathan
 
 
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Calling a Script from ZPT

2006-09-18 Thread Ferhat Ayaz
Hi,

a quick and newbie question:

How can I call a Script (Python) within a page
template. I'm using the 'define' tag:

tal:contain
 define=no_matter_var
python:context.mycall(myParam)/

Is there a more serious way to do this?

Thanks,
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] \n problems with mysql5

2006-09-15 Thread Ferhat Ayaz
Hi,

I used mysql4 with Z MySQL without any problems. Now I
want to update to mysql5. Unfortunatly the server
reports a syntax error like the follows:
-
Site Error

An error was encountered while publishing this
resource.

Error Type: ProgrammingError
Error Value: (1064, You have an error in your SQL
syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near
'on\n(\n articles.store_id = stores.id \n and \n
articles.manifacture_id = manifac' at line 7)
-
I think the problem is the '\n' character. Have you
any idea how to solve this problem???

Thanks,
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] \n problems with mysql5

2006-09-15 Thread Ferhat Ayaz

Hi,
sorry list. The problem was the changed syntax of JOIN
between mysql 4 and 5.

SELECT bla FROM bla INNER JOIN table1,table2 ON ( bla
)

must be changed to

SELECT bla FROM bla INNER JOIN (table1,table2) ON (
bla )

Greets,
Ferhat

--- Ferhat Ayaz [EMAIL PROTECTED] wrote:

 Hi,
 
 I used mysql4 with Z MySQL without any problems. Now
 I
 want to update to mysql5. Unfortunatly the server
 reports a syntax error like the follows:
 -
 Site Error
 
 An error was encountered while publishing this
 resource.
 
 Error Type: ProgrammingError
 Error Value: (1064, You have an error in your SQL
 syntax; check the manual that corresponds to your
 MySQL server version for the right syntax to use
 near
 'on\n(\n articles.store_id = stores.id \n and \n
 articles.manifacture_id = manifac' at line 7)
 -
 I think the problem is the '\n' character. Have you
 any idea how to solve this problem???
 
 Thanks,
 Ferhat
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 
 ___
 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 )
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Authentication on a Folder?

2006-09-11 Thread Ferhat Ayaz
Hi,

I want to restrict access to a subfolder:

Folder structure:
-
Root Folder
 +- MySite
  +- Admin


Access limitation:
-
My Site: Public for all
Admin: Only with Basic Authentication

Notes:
-
My page templates under 'MySite' use Script (Python)
calls from Admin folder like:

index_html (in MySite):
-
html
...
tal:contain define=user container/Admin/getUser
 ...
/tal:container
...
/html

But 'getUser' should not be able for access from
outside the application server.

How can I do this? 

Thanks very much,
Ferhat



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Authentication on a Folder?

2006-09-11 Thread Ferhat Ayaz

argh, yes thanks. It's better then basic auth. (and
easier)

But know I'm standing against the problem: calling
Scripts from an authentication Folder within the
application server.

+ MySite : index_html
|-+ Admin : getUser

In index_html: 
p tal:content=container/Admin/getUser/
will an authenticated user. But the page template
MySite/index_html should have access to the Script
Admin/getUser. 
I don't know how to do this.??

thanks,
Ferhat


--- Andreas Jung [EMAIL PROTECTED] wrote:

 
 
 --On 11. September 2006 01:05:01 -0700 Ferhat Ayaz
 [EMAIL PROTECTED] 
 wrote:
 
  Hi,
 
  I want to restrict access to a subfolder:
 
  Folder structure:
  -
  Root Folder
   +- MySite
+- Admin
 
 
  Access limitation:
  -
  My Site: Public for all
  Admin: Only with Basic Authentication
 
 
 Why basic authentication? In general you control
 access to objects
 by granting or revoking a particular permission (in
 your case
 the View permission) to roles/from roles (see Access
 tab within the ZMI).
 
 -aj
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Authentication on a Folder?

2006-09-11 Thread Ferhat Ayaz
hmm. But isn't it a hard work to set each script a
specific permission instead of setting (I don't know
how) the contained folder to the right permission?
I want give to all Scripts full access, if these are
called from another ZObject (page templates, etc.).
but I don't want, that this script can be called via a
web browser, because this scripts will modify the
database.

--- Chris Withers [EMAIL PROTECTED] wrote:

 Ferhat Ayaz wrote:
  In index_html: 
  p tal:content=container/Admin/getUser/
  will an authenticated user. But the page template
  MySite/index_html should have access to the Script
  Admin/getUser. 
  I don't know how to do this.??
 
 I think you're looking for Proxy Roles...
 
 Chris
 
 -- 
 Simplistix - Content Management, Zope  Python
 Consulting
 - http://www.simplistix.co.uk
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] assign REQUEST object to redirect?

2006-09-09 Thread Ferhat Ayaz
Hi,

If I return n Script (Python) the following

container.REQUEST.form['id'] = 1
return context.index_html(container.REQUEST)


then I have access to request/form/id within the page
template index_html.

Now I must redirect instead of returning like

return
container.REQUEST.RESPONSE.redirect('index_html')

But how can I give request object in a redirect.
Don't suggest the way appending the query string with 

'index_html?'+form fields ...

Thanks,
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Reading File Object in Script (Python)

2006-09-07 Thread Ferhat Ayaz
Hi,

I want to read a File object from ZODB. How can I read
the content of the uploaded File object?
I must to read it line by line with readlines()
Can you show a little code block how to do this?

Thanks and greets,
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Python import security problem

2006-09-03 Thread Ferhat Ayaz
Hi,

(As you know) I'm a zope newbie. I didn't find a
article describing my following problem.

I can not import python objects like 'time'. If I use

import time

I'll become the error message

You are not allowed to access 'time' in this context

Is it not possible to do this

Thank you very much
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] iterating dictionaries with dtml-in

2006-09-03 Thread Ferhat Ayaz

Thank you for your suggestion.
Indeed, I noticed that page templates are great. I can
code my websites now fastern then with any other
alternative. I'm also using Dreamweaver to design the
pages. It's just great and its working without
problems. Accessing dictionaries are nativly supported
by page templates. I'm reading the zope book 2.7
(plope.org) now. I read the 2.7 before.

Greets,
Ferhat

--- David H [EMAIL PROTECTED] wrote:

 Dieter Maurer wrote:
 
 Ferhat Ayaz wrote at 2006-9-2 04:40 -0700:
   
 
 ...
 I want to do this with DTML.
 
 select
 dtml-in getDicts
 option
 HOW CAN I PUT the keys 'name' HERE 
 /option
 /dtml-in
 /select
 (getDicts returns the above list of dictionaries)
 
 
 
 You probably need the mapping attribute of
 dtml-in -- and maybe some
 background reading (you should read the
 documentation (Zope Book 2.7 edition,
 online on plope.org).
 
 
 
   
 
 Ferhat,
 
 If you are new to Zope do yourself a favor and
 forget about DTML.  Yeah 
 its fun and (seemingly) easy to learn.  But I argue
 for Page Templates + 
 python.  Python is so much clearer than dtml - and
 Page Templates + 
 python *is* the favored zope paradigm.
 
 But if you insist - Casey Duncan wrote a nice
 product (dtml-eval) and an 
 interesting discussion  about DTML and what to watch
 out for ...
 
 http://www.zope.org/Members/Kaivo/EvalTag_HowTo
 
 
 
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] iterating dictionaries with dtml-in

2006-09-02 Thread Ferhat Ayaz
Hi,
I know it's a silly question. But I was not able to
find an example for this:

I have a list of dicts like 
[
 {'name':'John','age':27},
 {'name':'Marc','age':17}, 
 {'name':'Susanne','age':19}
]

Now I want to iterate each 'name' like
select
 optionJohn/option
 optionMarc/option
 optionSusanne/option
/select

I want to do this with DTML.

select
dtml-in getDicts
option
 HOW CAN I PUT the keys 'name' HERE 
/option
/dtml-in
/select
(getDicts returns the above list of dictionaries)


Thanks and greets,
Ferhat




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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: How can I import python script into another python script?

2006-09-01 Thread Ferhat Ayaz

Thanks,

it's just a little function (3-5 lines) and uses the
REQUEST object. It will lookup for request parameters,
if not found, a default value will be returned.
But your suggestion can make the code more readable.

Greets,
Ferhat

--- Duncan Booth [EMAIL PROTECTED]
wrote:

 Gabriel Genellina wrote:
 
  At Thursday 31/8/2006 18:11, Ferhat Ayaz wrote:
  
 I have a Script (Python) called 'functions'.
 I want to import this script into another Script
 (Python).
 
 import Include.Functions.requests
 
 says
 
 import of Include.Functions.requests is
 unauthorized
  
  You don't import it; you can reference it as 
  container.Include.Functions.whatever(args...)
  
 
 Or even do:
 
 Functions = container.Include.Functions
 
 and then reference:
 
 Functions.whatever()
 
 But do yourself a favour and extract the functions
 out of your Python 
 script into a Python module. It will run faster and
 be easier to maintain 
 and to debug.
 
 ___
 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 )
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] insert_id with MySQL an Z SQL Method

2006-09-01 Thread Ferhat Ayaz
Hi,

I have a Z SQL Method with an insert expression. To
the inserted row will be assigned an auto_increment
id. How can I get the last inserted id?

I tryed the following both commands in one Z SQL
method. Unfortunatly this produces an error.

insert into categories (parent_id,logo,active) values
(
 dtml-sqlvar parent_id type=int,
 dtml-sqlvar logo type=string,
 dtml-sqlvar active type=int,
);

SELECT currval('table_id_seq');

Thanks for your helps

Greets,
Ferhat


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] insert_id with MySQL an Z SQL Method

2006-09-01 Thread Ferhat Ayaz
Thanks for the answers. The keyword I missed was
dtml-var sql_delimiter. Now it's working. Here my
complete Z SQL Method:

---
insert into categories (parent_id,logo,active) values
(
 dtml-sqlvar parent_id type=int,
 dtml-sqlvar logo type=string,
 dtml-sqlvar active type=int
)
dtml-var sql_delimiter
select LAST_INSERT_ID() as table_id_seq
---

--- Allen Schmidt Sr. [EMAIL PROTECTED]
wrote:

 I have been using this successfully for a while.
 Don't remember where I 
 found out about it though:
 
 insert stuff...
 dtml-var sql_delimiter
 
 select alert_id from entertainment_alerts
where alert_id = @@identity
 
 
 Allen
 
 
 
 Cliff Ford wrote:
 
  Search the mailing list archives for July - there
 were several 
  contributions to this question. Roughly:
  
  insert ...
  dtml-var sql_delimiter
  select LAST_INSERT_ID() as table_id_seq
  
  Cliff
  
  Ferhat Ayaz wrote:
  
  Hi,
 
  I have a Z SQL Method with an insert expression.
 To
  the inserted row will be assigned an
 auto_increment
  id. How can I get the last inserted id?
 
  I tryed the following both commands in one Z SQL
  method. Unfortunatly this produces an error.
 
  insert into categories (parent_id,logo,active)
 values
  (
   dtml-sqlvar parent_id type=int,
   dtml-sqlvar logo type=string,
   dtml-sqlvar active type=int,
  );
 
  SELECT currval('table_id_seq');
 
  Thanks for your helps
 
  Greets,
  Ferhat
 
 
 
 __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around 
  http://mail.yahoo.com
 ___
  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 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 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 )
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 can I import python script into another python script?

2006-08-31 Thread Ferhat Ayaz
Hi,

I have a Script (Python) called 'functions'.
I want to import this script into another Script
(Python).

import Include.Functions.requests

says

import of Include.Functions.requests is unauthorized

Where am I wrong?

Thanks,
Ferhat

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] python expression in tal:attributes

2006-08-30 Thread Ferhat Ayaz
Hi,

I have a question. I really don't know how to solve
this problem. I have 

ul
 li tal:define=links python:{
  'Catalog/index.html':'Catalog',
  'Users/index.html':'Users',
  'Orders/index.html':'Orders'}
   tal:repeat=item links/items
   a href= 
 tal:attributes= href  
  string:${container/absolute_url}/${python:item[0]}
 tal:content=python:item[1]link name/a
 /li
/ul

this is _of course_ not working because of
${python:item[0]}. It's illegal. But with this
expression I want to show what I want to do: I want to
add a python expression to a string. 

How can I do this??? 

Thanks,
Ferhat

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] python expression in tal:attributes

2006-08-30 Thread Ferhat Ayaz

yes, you're right. With define it works. Below is the
same code with define. Thank you.
But now I have another problem (actually my main
problem). For instance,if you click more and more on
the link 'Catalog'. The URL grows up like 
http://localhost:8080/Site/Catalog/Catalog/Catalog//index.html
How can I say that the Catalog folder is just under
the Site folder?

   ul
li tal:define=links python:{
'Catalog/index.html':'Catalog',
'Users/index.html':'Users',
'Orders/index.html':'Orders'}
tal:repeat=item links/items
a href= 
tal:define=link python:item[0]
tal:attributes=href
string:${container/absolute_url}/${link}
tal:content=python:item[1]link name/a
/li
   /ul

--- Andreas Jung [EMAIL PROTECTED] wrote:

 
 
 --On 30. August 2006 04:18:53 -0700 Ferhat Ayaz
 [EMAIL PROTECTED] 
 wrote:
 
 
  this is _of course_ not working because of
  ${python:item[0]}. It's illegal.
 
 Why don't you use a tal:define inside the same tag
 to bind the value of 
 this expression to a variable  and use this variable
 inside tal:attributes 
 instead?
 
 -aj


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] python expression in tal:attributes

2006-08-30 Thread Ferhat Ayaz
Thanks to all. Now I extracted the links to a python
script like

url = container.Site.absolute_url()
return {
 url+'/Catalog/index.html': 'Catalog',
 url+'/Members/index.html': 'Members',
 url+'/Orders/index.html': 'Orders',
}.items()

and this works fine. index.html was just an example.
I'll change the link names. 
But I'm still not so happy with this solution because
I must change the line

url = container.Site.absolute_url()

to 

url = container.my-site-root.absolute_url()

later after productive installation. 

Greets,
Ferhat


--- Jens Vagelpohl [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 
 On 30 Aug 2006, at 14:40, Ferhat Ayaz wrote:
 
  but my site root is /Site and not /, which can be
  changed later.
  Should I define this as a variable, or is there a
  better way?
 
 Yes there is. Ditch hardcoded strings and ask the
 objects themselves  
 for their path. So in your code you could say...
 
 Site.absolute_url()
 
 instead of / or /Site, because it will do the
 right thing with  
 virtual hosting.
 
 jens
 
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.1 (Darwin)
 

iD8DBQFE9YhMRAx5nvEhZLIRApbJAJ4x+iwpT68gyBIfpBCIQmRTrrJWgQCgpyH4
 JIRjVtOC/Y8sCas6ffvDYRs=
 =UfE6
 -END 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 )
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Acquisition question

2006-08-29 Thread Ferhat Ayaz
Thanks for the answers.
The example was from the Zope Book.

employee_by_id - Z SQL Method
emp_id - Parameter key for employee_by_id
2 - Parameter value for emp_id

The result of employee_by_id(emp_id=2) is a SQL
result. 

viewEmployee - DTML Method

viewEmployee will use the result of the above
employee_by_id Z SQL Method and render the variables
first,last and salary to HTML, if I call the URL from
a browser.

But, giving the same URL
employee_by_id/emp_id/2/viewEmployee as a tal
expression like

tal:content=structure
employee_by_id/emp_id/2/viewEmployee

will render nothing. There is also no error messages. 
Do you know what happens?

Thanks,
Ferhat


--- Garito [EMAIL PROTECTED] wrote:

 Ferhat Ayaz escribió:
  Hi list,
 
  I'm a newby to zope. Sorry if the question is to
  dummy.
  Here my question:
 
  You can do acquisition on URL like
 
 

http://localhost:8080/employee_by_id/emp_id/2/viewEmployee
 
  here the result of employee_by_id (param is
 emp_id=2)
  is used by viewEmployee.
 
  But I want to use it in a page template like
 
  td tal:content=
 structure
 mployee_by_id/emp_id/2/viewEmployee
  /td
 
  Unfortunatly this will not work like the above
  example.
 
  Is it possible to do acquisition in this way, or
 is
  there a way to this?
 
  Thanks,
  Ferhat
 
 
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around 
  http://mail.yahoo.com 
  ___
  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 )

 At this point if employee_by_id is the first param
 then all are on 
 traverse_subpath list like:
 
 ['employee_by_id', 'emp_id', 2, 'viewEmployee']
 
 then you could use this list to know what your user
 is asking for
 
 Sorry for my poor english
 
 -- 
 Mis Cosas
 http://blogs.sistes.net/Garito
 
 
 ___
 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 )
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Acquisition question

2006-08-29 Thread Ferhat Ayaz
wow. Thanks. This is exactly that what I need. :)

--- Dieter Maurer [EMAIL PROTECTED] wrote:

 Ferhat Ayaz wrote at 2006-8-28 11:06 -0700:
 Here my question:
 
 You can do acquisition on URL like
 

http://localhost:8080/employee_by_id/emp_id/2/viewEmployee
 
 here the result of employee_by_id (param is
 emp_id=2)
 is used by viewEmployee.
 
 But I want to use it in a page template like
 
 td tal:content=
structure mployee_by_id/emp_id/2/viewEmployee
 /td
 
 Unfortunatly this will not work like the above
 example.
 
 The reason for this different behaviour is that a
 ZSQL method uses a traversal hook to implement the
 method/parameter feature.
 This traversal hook is only activated during URL
 traversal
 but not for path expression evaluation.
 
 Fortunately, you do not need this hook in TALES.
 You can instead use a Python expression to call
 the ZSQL Method explicitely:
 
 td tal:content=
   structure
 python:employee_by_id(emp_id=2).viewEmployee()
/
 
 This will work only (reliably) when viewEmployee
 is
 a PageTemplate (not a DTML object).
 
 For a DTML object viewEmployee you could use:
 
td tal:define=employee
 python:employee_by_id(emp_id=2)
  tal:content=employee/viewEmployee
  /
 
 You find the reason for this strange DTML object
 behaviour
 in the Calling DTML objects section of
 
  

http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html
 
 
 
 -- 
 Dieter
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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] Acquisition question

2006-08-28 Thread Ferhat Ayaz
Hi list,

I'm a newby to zope. Sorry if the question is to
dummy.
Here my question:

You can do acquisition on URL like

http://localhost:8080/employee_by_id/emp_id/2/viewEmployee

here the result of employee_by_id (param is emp_id=2)
is used by viewEmployee.

But I want to use it in a page template like

td tal:content=
   structure mployee_by_id/emp_id/2/viewEmployee
/td

Unfortunatly this will not work like the above
example.

Is it possible to do acquisition in this way, or is
there a way to this?

Thanks,
Ferhat




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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 )