Re: [Zope] Zope will not allow access after IP address change

2006-05-24 Thread robert rottermann

Jeremiah Foster wrote:

On Wed, 2006-05-24 at 18:14 +0200, Andreas Jung wrote:
  
--On 24. Mai 2006 18:06:07 +0200 Jeremiah Foster 



  

I cannot seem to access the zope management interface on one of our
machines after we moved it to another ISP. All the software is the same,
the machine is the same, the only things changed are;

1. /etc/hosts
2. hostname
3. IP address

Is there some security or other mechanism in zope that prevents zope
from starting?

  

You should access your machine and check your logs for errors.

 
Another error I see is;


2006-05-02T12:35:03 ERROR Zope Could not import Products.ZMySQLDA
Traceback (most recent call last):
  File "/usr/local/www/Zope28/lib/python/OFS/Application.py", line 695, in 
import_product
product=__import__(pname, global_dict, global_dict, silly)
  File "/usr/local/www/zopeserver/Products/ZMySQLDA/__init__.py", line 91, in ?
import DA
  File "/usr/local/www/zopeserver/Products/ZMySQLDA/DA.py", line 92, in ?
from db import DB
  File "/usr/local/www/zopeserver/Products/ZMySQLDA/db.py", line 99, in ?
from MySQLdb.converters import conversions
  File "/usr/local/lib/python2.3/site-packages/MySQLdb/__init__.py", line 34, 
in ?
from sets import ImmutableSet
ImportError: cannot import name ImmutableSet

This appears to point to the fact that zope cannot import Products.ZMySQLDA but it 
has already been installed on this machine. Furthermore, this should not prevent logins 
to the management interface should it?


Jeremiah

___
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 )

  

I would assume your zope does not start at all.
this is why you can not access it.
go to your zope instance an start it with
zopectrl fg
robert
begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
version:2.1
end:vcard

___
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] [i18n] i18n not working in nested macros?

2006-05-24 Thread Andreas Jung

I am running a Plone site with Plone 2.1.X on top of Zope 2.8.6.
I have a case  where base_edit calls a macro for a self-written macro which 
calls  another helper macro. This one contains something stupid as


end date

However the content of the tag is never translated...all macros define
i18n:plone inside the HTML tag, the tag defining the macro and also
I put inside the  tag. When I move the  tag inside the macro 
called by base_edit then everything works fine. I also added debug code to 
PTS to see if there is a problem with the translation service  however the
related message id never shows up. I have not track this down so far inside 
the TAL code...anyone ever encountered such a strange behavior?


Andreas


pgpd5iQXnxJT6.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 )


Re: [Zope] AJAX and Zope

2006-05-24 Thread Greg Fischer

The one thing I have found about Ajax and Zope (Ajax and anything
really) is that your returned scripts are typically so customized to
your web page DOM and your application logic.  So, as someone else
posted, Zope handles everything in it's own separate objects anyway,
so no need for a special server side processing system.  This is just
my limited experience though.

I found it was just as easy to use Dojo Toolkit and my plain old DTML
objects on Zope2 for my app server.  You could just as easily use PT
and Python scripts.  Have a look at this site I did as a demo last
fall.

http://www.zajax.net

I was first asking the same things you were.  I wanted a library or
some other way to handle the Ajax calls, but found it was so simple to
just use Dojo and let it do asynchronous calls to Zope DTML objects.
What I have is uber simple, but that's all I wanted.

I can't remember if in that demo I returned javascripts or html, but I
do know that with Dojo you can do either one.  I built another small
Ajax app later, and it does return javascripts. (very fast updates
that way)



On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:

By Zope objects I meant:

You've got a page template for example, and you include such an "AJAX enabled 
object", basically rendering an HTML fragment, and the resulting page will include 
the page template code + the fragment (similar to a macro call), but will also include 
the needed javascript code to handle the asynchronous communication.

Then another thing would be something like a PythonScript object (so you define 
python code and return python structures) and get it rendered as javascript to 
be included in somepage for processing the data returned by an asynchronous 
XML-RPC call to Zope within the browser.

Does it make more sense now?

Pascal

-Message d'origine-
De: Lennart Regebro [mailto:[EMAIL PROTECTED]
Envoyé: mercredi 24 mai 2006 14:56
Ŕ: Pascal Peregrina
Cc: zope@zope.org
Objet: Re: [Zope] AJAX and Zope

On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:
> I was wondering if there is any plan to have built-in support (i.e.
> helpers, built-in Zope objects, etc) in order to support AJAX in Zope at
> some point.

The helpers would then be some sort of Ajax JS library. I think that
at this time it makes more sense to let people choose for themselves.
If one turns out to be better than the others, it will spread around
the community and become a "default" standard, and then maybe it's
interesting to include as a standard package, but thats a big maybe
and a big if.

I don't know what any built-in Zope-objects would do for Ajax. :)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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 )




--
Greg Fischer
1st Byte Solutions
http://www.1stbyte.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] Zope will not allow access after IP address change

2006-05-24 Thread Jeremiah Foster
On Wed, 2006-05-24 at 18:14 +0200, Andreas Jung wrote:
> 
> --On 24. Mai 2006 18:06:07 +0200 Jeremiah Foster 

> > I cannot seem to access the zope management interface on one of our
> > machines after we moved it to another ISP. All the software is the same,
> > the machine is the same, the only things changed are;
> >
> > 1. /etc/hosts
> > 2. hostname
> > 3. IP address
> >
> > Is there some security or other mechanism in zope that prevents zope
> > from starting?
> >
> 
> You should access your machine and check your logs for errors.
 
Another error I see is;

2006-05-02T12:35:03 ERROR Zope Could not import Products.ZMySQLDA
Traceback (most recent call last):
  File "/usr/local/www/Zope28/lib/python/OFS/Application.py", line 695, in 
import_product
product=__import__(pname, global_dict, global_dict, silly)
  File "/usr/local/www/zopeserver/Products/ZMySQLDA/__init__.py", line 91, in ?
import DA
  File "/usr/local/www/zopeserver/Products/ZMySQLDA/DA.py", line 92, in ?
from db import DB
  File "/usr/local/www/zopeserver/Products/ZMySQLDA/db.py", line 99, in ?
from MySQLdb.converters import conversions
  File "/usr/local/lib/python2.3/site-packages/MySQLdb/__init__.py", line 34, 
in ?
from sets import ImmutableSet
ImportError: cannot import name ImmutableSet

This appears to point to the fact that zope cannot import Products.ZMySQLDA but 
it 
has already been installed on this machine. Furthermore, this should not 
prevent logins 
to the management interface should it?

Jeremiah

___
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] Zope will not allow access after IP address change

2006-05-24 Thread Andreas Jung



--On 24. Mai 2006 18:44:08 +0200 Jeremiah Foster 
<[EMAIL PROTECTED]> wrote:


It seems to imply that there is a problem with a zope-mysql module which
is getting an operational error. But I did not think that mysql was used
for authentication. Are there other errors I should be looking out for?
Because there are other errors in the logs.



Well...you should know..it's your server...it's your app :-)
Perhaps the DB uses IP-based authentication and so possibly some 
configuration on the MySQL has to be accomplished...consult your MySQL DA.


-aj


--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


pgpZHeto0EpEx.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 )


Re: [Zope] Zope will not allow access after IP address change

2006-05-24 Thread Jeremiah Foster
On Wed, 2006-05-24 at 18:14 +0200, Andreas Jung wrote:
> 
> --On 24. Mai 2006 18:06:07 +0200 Jeremiah Foster 

> > I cannot seem to access the zope management interface on one of our
> > machines after we moved it to another ISP. All the software is the same,
> > the machine is the same, the only things changed are;
> >
> > 1. /etc/hosts
> > 2. hostname
> > 3. IP address
> >
> > Is there some security or other mechanism in zope that prevents zope
> > from starting?
> >
> 
> You should access your machine and check your logs for errors.

Thank you for the reply.

This error looks like the likely suspect;

2006-04-13T14:41:17 ERROR Shared.DC.ZRDB.Connection Error connecting to
relational database.
Traceback (most recent call last):
  File "/usr/local/www/Zope28/lib/python/Shared/DC/ZRDB/Connection.py",
line 69, in __setstate__
try: self.connect(self.connection_string)
  File "/usr/local/www/zopeserver/Products/ZMySQLDA/DA.py", line 126, in
connect
self._v_database_connection=DB(s)
  File "/usr/local/www/zopeserver/Products/ZMySQLDA/db.py", line 182, in
__init__
self.db=apply(self.Database_Connection, (), kwargs)
OperationalError: (1045, "Access denied for user
'statementdb'@'localhost' (using password: YES)")


It seems to imply that there is a problem with a zope-mysql module which
is getting an operational error. But I did not think that mysql was used
for authentication. Are there other errors I should be looking out for?
Because there are other errors in the logs.

Jeremiah

___
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] Zope will not allow access after IP address change

2006-05-24 Thread Andreas Jung



--On 24. Mai 2006 18:06:07 +0200 Jeremiah Foster 
<[EMAIL PROTECTED]> wrote:



Hello,

I cannot seem to access the zope management interface on one of our
machines after we moved it to another ISP. All the software is the same,
the machine is the same, the only things changed are;

1. /etc/hosts
2. hostname
3. IP address

Is there some security or other mechanism in zope that prevents zope
from starting?



You should access your machine and check your logs for errors.

-aj

--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


pgphteDs1v9Ym.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] Zope will not allow access after IP address change

2006-05-24 Thread Jeremiah Foster
Hello,

I cannot seem to access the zope management interface on one of our
machines after we moved it to another ISP. All the software is the same,
the machine is the same, the only things changed are;

1. /etc/hosts
2. hostname
3. IP address

Is there some security or other mechanism in zope that prevents zope
from starting?

Thanks,

Jeremiah

___
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] zope.conf Zeo question

2006-05-24 Thread Jonathan
That did the trick! (I had created a /apps/zeo1 directory on the server 
machine, but I did not have a matching directory on the client machine to 
hold the persistent cache file)


Thanks very much!

Jonathan

- Original Message - 
From: "Jens Vagelpohl" <[EMAIL PROTECTED]>

To: "[Zope] List Mailing" 
Sent: Wednesday, May 24, 2006 10:25 AM
Subject: Re: [Zope] zope.conf Zeo question



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 24 May 2006, at 14:16, Jonathan wrote:
When I run zope on the zeo client & check the 'zeo1' database in  the 
ControlPanel I get the following traceback:


Traceback (innermost last):
 Module ZPublisher.Publish, line 106, in publish
 Module ZPublisher.BaseRequest, line 323, in traverse
 Module App.ApplicationManager, line 122, in __bobo_traverse__
 Module App.ApplicationManager, line 113, in __getitem__
 Module Zope2.Startup.datatypes, line 280, in getDatabase
 Module Zope2.Startup.datatypes, line 178, in open
 Module Zope2.Startup.datatypes, line 175, in createDB
 Module ZODB.config, line 97, in open
 Module ZODB.config, line 155, in open
 Module ZEO.ClientStorage, line 312, in __init__
 Module ZEO.cache, line 107, in __init__
 Module ZEO.cache, line 774, in __init__
IOError: [Errno 2] No such file or directory: '/apps/zeo1/var/ 
zeo1-1.zec'
Why is the zeo client looking for '/apps/zeo1/var/zeo1-1.zec'? How  do I 
get the zeo client to point at the zeo-created Data.fs which  resides in 
/apps/zeo1/var on the machine at 192.168.123.1?Zope  2.9.2 is running on 
the zeo client.  Zope is not running on the  server (just zeo from the 
Zope 2.9.2 installation tarball)Any and  all help appreciated!Jonathan


It is attempting to create the persistent cache file, which resides  in 
$INSTANCE/var/XXX. Does the path /apps/zeo1/var/ exist and does  the user 
Zope runs as have permissions to write into that directory?


jens

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

iD8DBQFEdGzDRAx5nvEhZLIRAv0xAJ48h1AA/zzYkJBTNVi7IKT59zqwFACgozGr
qSY1Yho7wtA0h/Vpu+c58mE=
=/0yH
-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 )



___
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] AJAX and Zope

2006-05-24 Thread Jim Washington

Lennart Regebro wrote:

On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:

By Zope objects I meant:

You've got a page template for example, and you include such an "AJAX 
enabled object", basically rendering an HTML fragment, and the 
resulting page will include the page template code + the fragment 
(similar to a macro call), but will also include the needed 
javascript code to handle the asynchronous communication.


That is a macro call. There is no difference. It just that the macro
includes the HTML needed to suck in the JS library you use.
I have been working on a simple WSGI middleware filter that handles js 
library insertion pretty well, without complicated macros that assure 
that a javascript library gets included only once. 

It works by creating a WSGI environ variable for desired includes.  
Individual widgets ask a utility to register their need for a particular 
javascript or css resource into that environ variable.


After Zope is finished generating the page, the middleware inserts the 
appropriate 

Re: [Zope] AJAX and Zope

2006-05-24 Thread Lennart Regebro

On 5/24/06, Tarek Ziadé <[EMAIL PROTECTED]> wrote:

You might want to look at Azax approach as well:
besides the way it works (you define behaviors in XML files, that get
processed by a js engine)
it gathers Zope 3 help views, that let the developer define the behavior
in Python

I think the stuff lennart talks about is CrackAjax, but IIRC it is  not
really maintained
and let you kinda write javascript in Python: the python code is not
valid (can't be tested, etc..), but translated to valid javascript


I was thinking loosely about both approaches, as I'm not fully up to
date about the progress in these areas.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] zope.conf Zeo question

2006-05-24 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 24 May 2006, at 14:16, Jonathan wrote:
When I run zope on the zeo client & check the 'zeo1' database in  
the ControlPanel I get the following traceback:


Traceback (innermost last):
 Module ZPublisher.Publish, line 106, in publish
 Module ZPublisher.BaseRequest, line 323, in traverse
 Module App.ApplicationManager, line 122, in __bobo_traverse__
 Module App.ApplicationManager, line 113, in __getitem__
 Module Zope2.Startup.datatypes, line 280, in getDatabase
 Module Zope2.Startup.datatypes, line 178, in open
 Module Zope2.Startup.datatypes, line 175, in createDB
 Module ZODB.config, line 97, in open
 Module ZODB.config, line 155, in open
 Module ZEO.ClientStorage, line 312, in __init__
 Module ZEO.cache, line 107, in __init__
 Module ZEO.cache, line 774, in __init__
IOError: [Errno 2] No such file or directory: '/apps/zeo1/var/ 
zeo1-1.zec'
Why is the zeo client looking for '/apps/zeo1/var/zeo1-1.zec'? How  
do I get the zeo client to point at the zeo-created Data.fs which  
resides in /apps/zeo1/var on the machine at 192.168.123.1?Zope  
2.9.2 is running on the zeo client.  Zope is not running on the  
server (just zeo from the Zope 2.9.2 installation tarball)Any and  
all help appreciated!Jonathan


It is attempting to create the persistent cache file, which resides  
in $INSTANCE/var/XXX. Does the path /apps/zeo1/var/ exist and does  
the user Zope runs as have permissions to write into that directory?


jens

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

iD8DBQFEdGzDRAx5nvEhZLIRAv0xAJ48h1AA/zzYkJBTNVi7IKT59zqwFACgozGr
qSY1Yho7wtA0h/Vpu+c58mE=
=/0yH
-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] AJAX and Zope

2006-05-24 Thread Pascal Peregrina
Well, that's why I mentioned this in my initial mail:
http://jtauber.com/blog/2006/05/23/primitive_python_version_of_gwt_working
(the python to javascript translator part)

Of course I know how to make some AJAX to in Zope for some specific 
application. But I wanted to know if some of the core Zope developers had ever 
thought about a more generic approach. 

For example I am sure that having this "python to javascript translator" and 
objects like PythonScripts that would have a "javascript" view is something 
that would make AJAX enabled pages development on Zope much easier (just a 
matter of including the JS library and then make some python code).

Pascal

-Message d'origine-
De : Lennart Regebro [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 24 mai 2006 15:27
À : Pascal Peregrina
Cc : zope@zope.org
Objet : Re: [Zope] AJAX and Zope

On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:
> By Zope objects I meant:
>
> You've got a page template for example, and you include such an "AJAX enabled 
> object", basically rendering an HTML fragment, and the resulting page will 
> include the page template code + the fragment (similar to a macro call), but 
> will also include the needed javascript code to handle the asynchronous 
> communication.

That is a macro call. There is no difference. It just that the macro
includes the HTML needed to suck in the JS library you use.

> Then another thing would be something like a PythonScript object (so you 
> define python code and return python structures) and get it rendered as 
> javascript to be included in somepage for processing the data returned by an 
> asynchronous XML-RPC call to Zope within the browser.

Thare has been discussions and efforts to make a library where you can
write python code and get Ajax out, yes. It is very non-trivial. :)

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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] AJAX and Zope

2006-05-24 Thread Tarek Ziadé
Lennart Regebro wrote:

> On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:
>
>> By Zope objects I meant:
>>
>> You've got a page template for example, and you include such an "AJAX
>> enabled object", basically rendering an HTML fragment, and the
>> resulting page will include the page template code + the fragment
>> (similar to a macro call), but will also include the needed
>> javascript code to handle the asynchronous communication.
>
>
> That is a macro call. There is no difference. It just that the macro
> includes the HTML needed to suck in the JS library you use.
>
>> Then another thing would be something like a PythonScript object (so
>> you define python code and return python structures) and get it
>> rendered as javascript to be included in somepage for processing the
>> data returned by an asynchronous XML-RPC call to Zope within the
>> browser.
>
>
> Thare has been discussions and efforts to make a library where you can
> write python code and get Ajax out, yes. It is very non-trivial. :)


You might want to look at Azax approach as well:
besides the way it works (you define behaviors in XML files, that get
processed by a js engine)

it gathers Zope 3 help views, that let the developer define the behavior
in Python

I think the stuff lennart talks about is CrackAjax, but IIRC it is  not
really maintained
and let you kinda write javascript in Python: the python code is not
valid (can't be tested, etc..), but translated to valid javascript

Tarek


___
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] AJAX and Zope

2006-05-24 Thread Lennart Regebro

On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:

By Zope objects I meant:

You've got a page template for example, and you include such an "AJAX enabled 
object", basically rendering an HTML fragment, and the resulting page will include 
the page template code + the fragment (similar to a macro call), but will also include 
the needed javascript code to handle the asynchronous communication.


That is a macro call. There is no difference. It just that the macro
includes the HTML needed to suck in the JS library you use.


Then another thing would be something like a PythonScript object (so you define 
python code and return python structures) and get it rendered as javascript to 
be included in somepage for processing the data returned by an asynchronous 
XML-RPC call to Zope within the browser.


Thare has been discussions and efforts to make a library where you can
write python code and get Ajax out, yes. It is very non-trivial. :)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] AJAX and Zope

2006-05-24 Thread Andreas Jung



--On 24. Mai 2006 14:18:34 +0100 Pascal Peregrina 
<[EMAIL PROTECTED]> wrote:



By Zope objects I meant:

You've got a page template for example, and you include such an "AJAX
enabled object", basically rendering an HTML fragment, and the resulting
page will include the page template code + the fragment (similar to a
macro call), but will also include the needed javascript code to handle
the asynchronous communication.

Then another thing would be something like a PythonScript object (so you
define python code and return python structures) and get it rendered as
javascript to be included in somepage for processing the data returned by
an asynchronous XML-RPC call to Zope within the browser.


You can do this already in Zope now in some way. Since AJAX requirements 
for an app are usually highly specific it does not make much sense to 
support a particular usecase. Zope is open and flexible enough to implement 
everything you need on top of it.


-aj



--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


pgpJNxaVvlMX4.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 )


Re: [Zope] AJAX and Zope

2006-05-24 Thread Jonathan

Have you looked at:

http://zif.hill-street.net/jsonserver


Jonathan

- Original Message - 
From: "Pascal Peregrina" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, May 24, 2006 9:18 AM
Subject: RE: [Zope] AJAX and Zope



By Zope objects I meant:

You've got a page template for example, and you include such an "AJAX 
enabled object", basically rendering an HTML fragment, and the resulting 
page will include the page template code + the fragment (similar to a 
macro call), but will also include the needed javascript code to handle 
the asynchronous communication.


Then another thing would be something like a PythonScript object (so you 
define python code and return python structures) and get it rendered as 
javascript to be included in somepage for processing the data returned by 
an asynchronous XML-RPC call to Zope within the browser.


Does it make more sense now?

Pascal

-Message d'origine-
De : Lennart Regebro [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 24 mai 2006 14:56
À : Pascal Peregrina
Cc : zope@zope.org
Objet : Re: [Zope] AJAX and Zope

On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:

I was wondering if there is any plan to have built-in support (i.e.
helpers, built-in Zope objects, etc) in order to support AJAX in Zope at
some point.


The helpers would then be some sort of Ajax JS library. I think that
at this time it makes more sense to let people choose for themselves.
If one turns out to be better than the others, it will spread around
the community and become a "default" standard, and then maybe it's
interesting to include as a standard package, but thats a big maybe
and a big if.

I don't know what any built-in Zope-objects would do for Ajax. :)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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 )


RE: [Zope] AJAX and Zope

2006-05-24 Thread Pascal Peregrina
By Zope objects I meant:

You've got a page template for example, and you include such an "AJAX enabled 
object", basically rendering an HTML fragment, and the resulting page will 
include the page template code + the fragment (similar to a macro call), but 
will also include the needed javascript code to handle the asynchronous 
communication.

Then another thing would be something like a PythonScript object (so you define 
python code and return python structures) and get it rendered as javascript to 
be included in somepage for processing the data returned by an asynchronous 
XML-RPC call to Zope within the browser.

Does it make more sense now?

Pascal

-Message d'origine-
De : Lennart Regebro [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 24 mai 2006 14:56
À : Pascal Peregrina
Cc : zope@zope.org
Objet : Re: [Zope] AJAX and Zope

On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:
> I was wondering if there is any plan to have built-in support (i.e.
> helpers, built-in Zope objects, etc) in order to support AJAX in Zope at
> some point.

The helpers would then be some sort of Ajax JS library. I think that
at this time it makes more sense to let people choose for themselves.
If one turns out to be better than the others, it will spread around
the community and become a "default" standard, and then maybe it's
interesting to include as a standard package, but thats a big maybe
and a big if.

I don't know what any built-in Zope-objects would do for Ajax. :)

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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] zope.conf Zeo question

2006-05-24 Thread Jonathan
I am trying to set up a zeo client on one machine and a zeo server on 
another machine.


I get the following messages in zeo.log (on the zeo server machine):

2006-05-24T08:42:04 INFO ZEO.StorageServer (8610) StorageServer created RW 
with storages: 1:RW:/apps/zeo1/var/Data.fs

--
2006-05-24T08:42:04 INFO ZEO.zrpc (8610) listening on ('', 8100)

So it looks like the zeo server is running ok & listing on port 8100.


On the zeo client machine I have the following entries in zope.conf:


   # Main FileStorage database
   
 path $INSTANCE/var/Data.fs
   
   mount-point /


  mount-point /Test/TestData
  # ZODB cache, in number of objects
  cache-size 5000
  
server 192.168.123.1:8100
storage 1
name zeostorage
var /apps/zeo1/var
# ZEO client cache, in bytes
cache-size 20MB
# Uncomment to have a persistent disk cache
client zeo1
  


(192.168.123.1 is the IP address of the server on my LAN)

When I run zope on the zeo client & check the 'zeo1' database in the 
ControlPanel I get the following traceback:


Traceback (innermost last):
 Module ZPublisher.Publish, line 106, in publish
 Module ZPublisher.BaseRequest, line 323, in traverse
 Module App.ApplicationManager, line 122, in __bobo_traverse__
 Module App.ApplicationManager, line 113, in __getitem__
 Module Zope2.Startup.datatypes, line 280, in getDatabase
 Module Zope2.Startup.datatypes, line 178, in open
 Module Zope2.Startup.datatypes, line 175, in createDB
 Module ZODB.config, line 97, in open
 Module ZODB.config, line 155, in open
 Module ZEO.ClientStorage, line 312, in __init__
 Module ZEO.cache, line 107, in __init__
 Module ZEO.cache, line 774, in __init__
IOError: [Errno 2] No such file or directory: '/apps/zeo1/var/zeo1-1.zec'
Why is the zeo client looking for '/apps/zeo1/var/zeo1-1.zec'? How do I get 
the zeo client to point at the zeo-created Data.fs which resides in 
/apps/zeo1/var on the machine at 192.168.123.1?Zope 2.9.2 is running on the 
zeo client.  Zope is not running on the server (just zeo from the Zope 2.9.2 
installation tarball)Any and all help appreciated!Jonathan 


___
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] allow access to fileobject depending on role

2006-05-24 Thread leandros van den berg

Hello,

I'm having trouble with the precondition field of a fileobject. I've got 
a fileobject (a PDF-file) and its precondition field states 
myPrecondition, which is a DTML Method and its code is:








(source: http://www.zopelabs.com/cookbook/1016369692)

The PDF-file should only be displayed when an user has role Bobo. If the 
user doesn't have the role, an user authentication screen (login screen) 
is displayed. The Method only works when the browser cache is empty or 
the file hasn't been openend yet by an user with Bobo-role. I'll explain 
the situations, both are on localhost.

Situation I:
- Browser cache is empty.
- User without Bobo-role logs in and opens the PDF-file by entering its 
URL in the browser and gets the login screen.


So far so good.

Situation II:
- User with Bobo-role logs in and opens the PDF-file by entering its URL 
in the browser and the file is being displayed.

- Close browser.
- User without Bobo-role logs in and opens the PDF-file by entering its 
URL in the browser and the file is being displayed.


Not so good. The user without Bobo-role in situation II should get a 
login screen. Apparently because the file is in the browser cache, the 
user is authenticated.


Does anybody know a solution to this problem or some other solution for 
allowing access to a fileobject depending on the role an user has?


Note: Using the security setting and assigning roles is not an option 
because the fileobject is recreated every night.


Kind regards,

Leandros
-- The Netherlands
___
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] AJAX and Zope

2006-05-24 Thread Lennart Regebro

On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote:

I was wondering if there is any plan to have built-in support (i.e.
helpers, built-in Zope objects, etc) in order to support AJAX in Zope at
some point.


The helpers would then be some sort of Ajax JS library. I think that
at this time it makes more sense to let people choose for themselves.
If one turns out to be better than the others, it will spread around
the community and become a "default" standard, and then maybe it's
interesting to include as a standard package, but thats a big maybe
and a big if.

I don't know what any built-in Zope-objects would do for Ajax. :)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] AJAX and Zope

2006-05-24 Thread Andreas Jung



--On 24. Mai 2006 13:43:27 +0100 Pascal Peregrina 
<[EMAIL PROTECTED]> wrote:



Hi,

I was wondering if there is any plan to have built-in support (i.e.
helpers, built-in Zope objects, etc) in order to support AJAX in Zope at
some point. Zope is already XML-RPC compliant, so it should not be very
difficult to do so...


I don't know why and where Zope itself as application server should support 
AJAX? AJAX support makes sense on a higher application level like schema 
(Archetypes, Z3 schemas etc.). Zope provides enough infrastructure to build 
anything to deal with Ajax in *some way* (what do you mean with "some 
point*?). But I doubt that Zope must deal with Ajax on the application 
server level.


-aj


--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


pgpDHkrq1L8j3.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] AJAX and Zope

2006-05-24 Thread Pascal Peregrina
Hi,

I was wondering if there is any plan to have built-in support (i.e.
helpers, built-in Zope objects, etc) in order to support AJAX in Zope at
some point. Zope is already XML-RPC compliant, so it should not be very
difficult to do so...

Has anyone seen this?
http://jtauber.com/blog/2006/05/23/primitive_python_version_of_gwt_worki
ng

Pascal


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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] apache rewrite rules redux

2006-05-24 Thread Chris Withers

David Bear wrote:

# see http://betabug.ch/zope/witch
RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\
https/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]

RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\
https/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]


These rules need to appear in the virtual host that's listening on port 
443, my suspicion is that it's being applied to the virtual host 
listening on port 80, and so doing nothing.



RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\
http/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]

RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\
http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]


In both cases, I see no need for two rules, just the one should suffice:

RewriteRule ^/z2(.*) http://127.0.0.1:9080/VirtualHostBase/\
http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2$1 [L,P]

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
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 )