[Zope] empty session with virtual hosting

2006-01-30 Thread Luca Dall'Olio

I have a Zope 2.9.0 installation under Solaris.
When I access the Zope site directly (port 8080) the session has the
keys I expect, but when I try to do the same using the virtual host
(port 80 has apache that rewrites to the zope installation) the session
is empty.

Do you have any hint about this behaviour ?

thank you in advance! Luca

___
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] missing add version in Zope

2006-02-09 Thread Luca Dall'Olio
I have been looking (almost) everywhere, but I can't find the Version 
line in the main combo box (the one for adding products).

This means that I cannot start working in a Version.
I can't find the Add Version line in the security tab, either.
In Control Panel I can see the Version Management, which is, of course, 
empty.


Zope Version
(Zope 2.9.0-, python 2.4.2, sunos5)

Python Version
2.4.2 (#1, Oct 3 2005, 01:55:05) [GCC 3.3.2]

System Platform
sunos5

Cookies are enabled on browser (Firefox and IE6)

Any hint would be greatly appreciated, Thanks In Advance!

Luca

___
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] webdav and PUT_factory

2006-02-27 Thread Luca Dall'Olio
First of all, I would like to thank everybody for your accurate and fast 
answers.


I am working with a small group of developers, each in different places 
and working at different times.

According to my past experience in java, this means cvs ^_^
I have some doubts about how to synchronize Zope development with cvs or 
subversion.

Should I stop using the ZMI? Should I develop a Zope Product instead?
Should I use fsdump instead of webdav to export from zope ? Should I 
use  webdav when deploying back to Zope?


This is my actual state-of-the-art about team management in Zope :
We develop inside locally installed Zope Instances, using the ZMI.
At the end of the day, we export the work done using webdav, and this 
works for DTML documents, DTML methods and ZSQL methods.
After that, we commit inside the source code repository, using the 
update, diff and merge features to synchronize with other developers' work.
We need to deploy to a Zope server in order to test the integration of 
developers' code, so I wrote a little PUT_factory to re-create the right 
objects, this is a snippet:


   elif ext == 'zsql':
   from Products.ZSQLMethods.SQL import SQL
   return SQL(name, '', 'daticonvegno', '' ,'')
   elif ext == 'dtml':
   from OFS.DTMLDocument import DTMLDocument
   return DTMLDocument( '', __name__=name )
   elif ext == 'dtmm':
   from OFS.DTMLMethod import DTMLMethod
   return DTMLMethod( '', __name__=name )
   elif major == 'text':
   from OFS.DTMLDocument import DTMLDocument
   return OFS.DTMLDocument.DTMLDocument( '', __name__=name )

As you can see, it uses extensions to understand the type of the file. 
This has some minor drawbacks :
1) you have to use extensions to make it work, otherwise you will have 
trouble at deploy-time
2) some additional parameters such as the connectionIds for ZSQLMethods 
must be auto-magically chosen by the PUT_factory
3) what about more complex objects, such as Plone, Archetypes or 
Openflow? should I map them all in the PUT_factory?


Is this the right way to do things in Zope? Is there any native 
solution for Source Code Versioning and Team Management?

How do other team solve this issue? Any advice is welcome!

Thank you very much in advance,
Luca


___
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] dtml methods and namespace

2006-03-09 Thread Luca Dall'Olio

Hi to everybody,

I have a simple dtml-method assignment-action that is called upon a 
form post.
Depending on the form request data, a dtml-if chooses between one of 
two dtml-documents : assigment-success and assignment-failure :


dtml-if  iscorrect()
dtml-var assignment-success
dtml-else
dtml-var assignment-failure
/dtml-if

My trouble is that neither the assignment-success nor the 
assignment-failure dtml-documents seem to be pushed on the namespace : 
inside them title_or_id references data from their caller, this() and 
PARENTS do not evaluate right... is there a smarter way to call a 
dtml-document inside a dtml-method (), so that it it pushed on the 
namespace stack? Should I use somehow the dtml-with tag?


I understand that page templates would be way easier and cleaner, but I 
would like to complete this project and then try them out in the next one...


thank you in advance,
Luca

___
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] localfs cannot save (ValueError: assigning to _p_jar is not supported )

2006-03-14 Thread Luca Dall'Olio
I have created some localfs directory. I can see files from filesystem 
and delete them from Zope, but  I cannot upload them or modify text 
files from Zope, because I get the following error :


Traceback (innermost last):

   * Module ZPublisher.Publish, line 113, in publish
   * Module ZPublisher.mapply, line 88, in mapply
   * Module ZPublisher.Publish, line 40, in call_object
   * Module Products.LocalFS.LocalFS, line 3, in manage_edit
   * Module OFS.Image, line 449, in manage_edit
   * Module ZODB.Connection, line 853, in register

ValueError: assigning to _p_jar is not supported

Searching this in google, seems to me that this is somehow related to 
the lack of Zope OIDs for localfs objects, and I suspect changes in Zope 
= 2.8 but I cannot get any further in the solution

Is localfs still supported?

Zope has full access rights to the local directory, this is my 
configuration :


Zope Version (Zope 2.9.0-, python 2.4.2, sunos5)
Python Version 2.4.2 (#1, Oct 3 2005, 01:55:05) [GCC 3.3.2]
System Platform sunos5

Thank you in advance, any hint is welcome!
Luca

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] how to count authenticated and anonymous users currently online ?

2006-03-16 Thread Luca Dall'Olio
I would like to know how many anonymous users are online and also if 
some authenticated users are.
I tried with guest counter but couldn't make it work, and tried also 
to inspect temp-folder/session_data but I get a security error.


Is there a way to accomplish this?

Thank you everybody in advance for any hint!

Luca

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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] how to count authenticated and anonymous users currently online ?

2006-03-16 Thread Luca Dall'Olio

Dieter Maurer wrote:


Luca Dall'Olio wrote at 2006-3-16 10:01 +0100:
 


I would like to know how many anonymous users are online
   



Do you know what this should mean?

The server has no a priori notion which users are online.

You may artificially define the term session
and then consider the number of session as representing
the number of online users.
If you do this and you use Zope sessions to implement your
notion of session, then you can look at the session_data_manager
to find out how many sessions are available.

 



This would be more than enough to me, to know how many sessions are 
still available.
If I could have the list of the ids of every active session, I could 
easily build the list I need (by the getSessionDataByKey() method)...

I tried with  something like :

dtml-in temp_folder.session_data.keys()
A session.
/dtml-in

but not even manager is allowed to execute that.

Even trying an External Method :

def activesessionlist( self):
   return self.temp_folder.keys()

does not have any effect, instead :

def sessionperiod( self):
   return self.temp_folder.getPeriodSeconds()

works right.

Could you please help me find out the list of active sessions? this is 
driving me crazy...


Thank you very much, Luca


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