Re: [Zope] Zope products that allows people to Add Comments to publications

2007-06-26 Thread Andreas Jung

Forget Squishdot, it's unmaintained since 4 years.

-aj

--On 26. Juni 2007 09:45:22 -0400 Thomas Bennett <[EMAIL PROTECTED]> 
wrote:



I have been wanting to try a SquishDot site also and get the very same
error.

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module App.special_dtml, line 65, in __call__
  Module DocumentTemplate.DT_String, line 476, in __call__
TypeError: unbound method mailhost_list() must be called with SquishSite
instance as first argument (got nothing instead)

Zope Version(Zope 2.10.3-final, python 2.4.3, linux2)
Python Version  2.4.3 (#1, Mar 14 2007, 18:51:08) [GCC 4.1.1 20070105
(Red Hat  4.1.1-52)]
System Platform linux2
SOFTWARE_HOME   /var/zope/lib/python
ZOPE_HOME   /var/zope
INSTANCE_HOME   /var/zope
CLIENT_HOME /var/zope/var
Network ServicesZServer.HTTPServer.zhttp_server (Port: 8082)
ZServer.HTTPServer.zwebdav_server (Port: 9800)


Thomas



On Monday 25 June 2007 19:03, kamal hamzat wrote:

hi Tom,

I have this error when add squishdot from ZMI

Error Type: TypeError
Error Value: unbound method mailhost_list() must be called with
SquishSite instance as first argument (got nothing instead)


Traceback (innermost last):

  a.. Module ZPublisher.Publish, line 119, in publish
  b.. Module ZPublisher.mapply, line 88, in mapply
  c.. Module ZPublisher.Publish, line 42, in call_object
  d.. Module App.special_dtml, line 65, in __call__
  e.. Module DocumentTemplate.DT_String, line 476, in __call__

Thanks
  - Original Message -
  From: Tom Von Lahndorff
  To: kamal hamzat
  Cc: zope@zope.org
  Sent: Monday, June 25, 2007 8:14 PM
  Subject: Re: [Zope] Zope products that allows people to Add Comments to
publications




  check out http://www.squishdot.org


  On Jun 25, 2007, at 3:00 PM, kamal hamzat wrote:


Hello,

Is there any zope product that allows visitors to Add Comments to the
news / articles, just like the one in plone.

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


--

Thomas McMillan Grant Bennett   Appalachian State University
Operations & Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25
pictures  per second and might last several minutes, how many words is
that?  - Linux Journal, July 2007

Library Systems Help Desk: http://www.library.appstate.edu/help/

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




--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK

E-Publishing, Python, Zope & Plone development, Consulting


pgpxR4UTXMg1R.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] A question on pool-size

2007-06-26 Thread Maciej Wisniowski

> The thing that is bugging me is that it seems my configuration is not being
> taken into account. Is there an absolute limit for pool_size?
>   
Go to lib/python/ZODB/DB.py file
There is a DB class with __init__ method.
Put some print statements here to display
pool_size and start zope with ./runzope or
./zopectl fg to see your prints.

You may also take a look at 'push' method
of _ConnectionPool in the same file. This is
the place where warning messages came from.
If you look closer then you'll see that there is no
absolute limit for pool_size. Only warnings are printed.

-- 
Maciej Wisniowski
___
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] A question on pool-size

2007-06-26 Thread Manuel Vázquez Acosta

Maciej,

Zope is Zope 2.9.6 (2.9.6-4etch1 from Debian repo).

I will try more zeo clients. Thanks for the tip.

The thing that is bugging me is that it seems my configuration is not being
taken into account. Is there an absolute limit for pool_size?

Best regards,
Manuel.


Maciej Wisniowski wrote:
> 
> Hello
> 
> First, which Zope version do you have?
> 
>> Sometimes it reported pool-size of 10, and sometimes it reported 7!
>> What could this be?
> Maybe you're seeing warnings from few storages? but I'm not sure how
> this works an I have no idea why you're seeing pool sizes as 7 and 10
> if you set this to 20
> 
>> Another question: My expect a load of 50 concurrent requests, so I set
>> zserver-threads to 25 on both zeo-clients, and a pool-size of 20 (but
>> behaving as explained above). Do this conf make any sense? Where should I
>> read to get more info about this matter?
> I think it is better to use more Zeo clients than bump number of
> threads. There were some benchmarks (or sth like that) showing
> that bigger number of threads doesn't help too much to performance,
> and it may be even worse.
> 
> In your setup, if you have 25 threads you should have pool size
> bigger than 25 - every thread will possibly use ZODB so it should
> have connection to use. In fact connection is created as needed, even if
> pool_size is too small. That is why number of connections in your logs
> is bigger than pool_size.
> 
> -- 
> Maciej Wisniowski
> ___
> 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 )
> 
> 

-- 
View this message in context: 
http://www.nabble.com/A-question-on-pool-size-tf3984717.html#a11314557
Sent from the Zope - General mailing list archive at Nabble.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] A question on pool-size

2007-06-26 Thread Maciej Wisniowski
Hello

First, which Zope version do you have?

> Sometimes it reported pool-size of 10, and sometimes it reported 7!
> What could this be?
Maybe you're seeing warnings from few storages? but I'm not sure how
this works an I have no idea why you're seeing pool sizes as 7 and 10
if you set this to 20

> Another question: My expect a load of 50 concurrent requests, so I set
> zserver-threads to 25 on both zeo-clients, and a pool-size of 20 (but
> behaving as explained above). Do this conf make any sense? Where should I
> read to get more info about this matter?
I think it is better to use more Zeo clients than bump number of
threads. There were some benchmarks (or sth like that) showing
that bigger number of threads doesn't help too much to performance,
and it may be even worse.

In your setup, if you have 25 threads you should have pool size
bigger than 25 - every thread will possibly use ZODB so it should
have connection to use. In fact connection is created as needed, even if
pool_size is too small. That is why number of connections in your logs
is bigger than pool_size.

-- 
Maciej Wisniowski
___
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] A question on pool-size

2007-06-26 Thread Manuel Vázquez Acosta

Hi all,

I'm having a rather weird behavior configuring pool-size.

I put a pool-size of 20 on two zeo-clients, but monitoring one of them I saw
this on logs:

2007-06-26T16:47:02 WARNING ZODB.DB DB.open() has 19 open connections with a
pool_size of 10
--
2007-06-26T16:47:02 WARNING ZODB.DB DB.open() has 20 open connections with a
pool_size of 10
--
2007-06-26T16:47:02 CRITICAL ZODB.DB DB.open() has 90 open connections with
a pool_size of 7

Sometimes it reported pool-size of 10, and sometimes it reported 7! What
could this be?

Another question: My expect a load of 50 concurrent requests, so I set
zserver-threads to 25 on both zeo-clients, and a pool-size of 20 (but
behaving as explained above). Do this conf make any sense? Where should I
read to get more info about this matter?

Best regards,
Manuel.
-- 
View this message in context: 
http://www.nabble.com/A-question-on-pool-size-tf3984717.html#a11313581
Sent from the Zope - General mailing list archive at Nabble.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] Several questions on Z3 Views backported thru Five

2007-06-26 Thread Manuel Vázquez Acosta

Thanks for your response...

I will try that. I have already started to "clean" up the views and creating
a very simple custom caching mechanism to achieve better perfomance. We have
made some success, but we're still working.

Best regards,
Manuel.



Tres Seaver wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Manuel Vázquez Acosta wrote:
>> Hi all,
>> 
>> I've been asked to deploy a Plone App which must satisfy a load of at
>> least 1200
>> users over 8 min.
>> 
>> I have tested a fresh Plone 2.5.3 with Zope 2.9.7, plus Squid + CacheFu
>> and
>> everything went just fine. The laptop didn't even notice such a load.
>> 
>> But, when I installed the Plone App, even much smaller load didn't pass
>> the test.
>> 
>> Thus, I have to dig into the source code of the app to find the source of
>> the
>> problems. I have found that the app uses Z3 concepts, specially Views.
>> This
>> question poped into my mind:
>> 
>> 1. Does Zope2+Five creates Views everytime they are used, and discard
>> them
>> afterwards?
>> 
>> If this is the case, then maybe I should code a ViewFactory which caches
>> frequently used views. This may help.
> 
> Nope, that won't help, because views are bindings between context
> objects and requests.
> 
> The time required to create views / adapters is completely negligible
> compared to the time required to *render* the Plone main template.  You
> need to focus on stripping out features you don't need in that template,
> and / or caching fragments of it.
> 
> 
> Tres.
> - --
> ===
> Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
> Palladion Software   "Excellence by Design"http://palladion.com
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGe92C+gerLs4ltQ4RAmVvAJ9+BXTwKTe9HqIq12XMYfu8CYtJkQCgpuce
> rRbBU2hqJKAQWXi3zFmS4V4=
> =zhVX
> -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 )
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Several-questions-on-Z3-Views-backported-thru-Five-tf3962154.html#a11309004
Sent from the Zope - General mailing list archive at Nabble.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] Several questions on Z3 Views backported thru Five

2007-06-26 Thread Manuel Vázquez Acosta

I'm heading that way... I have been reading CacheFu does not support yet Five
Views, but there's a roadmap (http://plone.org/products/cachefu/roadmap/6).
I'm willing to help with that, but I have talked yet to the rest of the
participants. However, I have a deadline for this App, I have proposed
several in-house caching mechanisms, just for now...

Thanks and best regards,
Manuel.


J Cameron Cooper-8 wrote:
> 
> Manuel Vázquez Acosta wrote:
>> Hi all,
>> 
>> I've been asked to deploy a Plone App which must satisfy a load of at
>> least 1200
>> users over 8 min.
>> 
>> I have tested a fresh Plone 2.5.3 with Zope 2.9.7, plus Squid + CacheFu
>> and
>> everything went just fine. The laptop didn't even notice such a load.
>> 
>> But, when I installed the Plone App, even much smaller load didn't pass
>> the test.
> 
> My first guess would be that the cache setup need to be configured to 
> work with your application. CacheFu knows about the default setup, but 
> not about a custom application. It may therefore not be caching, or be 
> caching inappropriately.
> 
> I think examining the response headers is the best way to determine this.
> 
> --jcc
> -- 
> Connexions
> http://cnx.org
> 
> "Building Websites with Plone"
> http://plonebook.packtpub.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 )
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Several-questions-on-Z3-Views-backported-thru-Five-tf3962154.html#a11308959
Sent from the Zope - General mailing list archive at Nabble.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] Several questions on Z3 Views backported thru Five

2007-06-26 Thread Manuel Vázquez Acosta

The Plone App is an Intranet for a customer of my employer that builds upon
CMFPlone, but most of its interface is based on Five Views. So we need
caching those.

Thanks for the tip. I will try ZopeProfiler right away.

Best regards,
Manuel.



Dieter Maurer wrote:
> 
> Manuel Vázquez Acosta wrote at 2007-6-21 14:16 +:
>> ...
>>I have tested a fresh Plone 2.5.3 with Zope 2.9.7, plus Squid + CacheFu
and
>>everything went just fine. The laptop didn't even notice such a load.
>>
>>But, when I installed the Plone App, even much smaller load didn't pass
the test.
> 
> What is the "Plone App"?
> 
> Use a profiler (e.g. "ZopeProfiler") to obtain a timing profile.
> It will tell you where time is spent for.
> 
> 
> 
> -- 
> Dieter
> ___
> 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 )
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Several-questions-on-Z3-Views-backported-thru-Five-tf3962154.html#a11308846
Sent from the Zope - General mailing list archive at Nabble.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] temp_folder not MountTemporaryFolder?

2007-06-26 Thread Manuel Vázquez Acosta

Thanks to all...

The problem was else where... I ran the bench and observed that
/temp_folder/session_data reported no objects. So something else was
causing the bunch of conflicts. I have found that the problem was
Plone set the last login time in logged_in.cpy, commenting this line
no more conflicts were issued, with this bench.

Again, thanks to all. I'll keep reading and digging Plone and Zope.

Currently my next move is to make improvements to CacheFu, in order to
cache Five Views.

Best regards,
Manuel.

On 6/24/07, Chris McDonough <[EMAIL PROTECTED]> wrote:

On Jun 24, 2007, at 9:31 PM, Manuel Vázquez Acosta wrote:

> Let me see if I got this right:
>
> According to ZODB.Mount.MountPoint: mount points are Zope objects
> that, when traversed, accesses a different database.

You got it.

>
> Do they report themselves as the container-class defined in zope.conf?
> I mean, when I traverse to /temp_folder what do I get? Is it the
> MountPoint instance or the container-class instance? Where should I
> look for this code?

It's the container-class instance (or at least it looks like it when
you get there, it does a bunch of trickery under the hood).  The
default container class is
Products.TemporaryFolder.TemporaryContainer.  You can influence it
within zope.conf though. One of the container class instances
(mounted at the /temp_folder mount point) is created within the
OFS.Application.install_tempfolder_and_sdc method during Zope startup.

>
> I have "tried" faster but without any luck. I modified OFS.Application
> and replaced TransientObjectContainer with
> faster.SessionDataContainer, but still I had too many ConflictErrors
> (didn't make any measure to compare with TransientObjectContainer).

Have you tried putting the session data container *not* in
temp_folder?  In other words, create a session data container in the
root of your zodb, then cause the session_data_manager object to
point at that?  You may observe better performance (with the penalty
of more storage growth) because FileStorage is typically better at
resolving conflicts nowadays than TemporaryStorage is.  Note that if
you're using ZEO, don't put the data container in the root, you will
only get more conflicts.  Instead, mount a FileStorage somewhere.
See http://plone.org/documentation/how-to/multiple-plone-sites-per-
zope-instance-using-separate-data-fs-files-for-each-one for a
reasonable explanation of how to create new mount points (ignore the
Ploney bits, only pay attention to steps 1 and 2).

- C



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


[Zope] Re: how to restore a copied instance.

2007-06-26 Thread J Cameron Cooper

Tudor Gabriel wrote:
hi, i needed to reinstall my zope site on another computer so i 
installed (in debian) plone-site using aptitude ... it automatically 
makes a new instance and starts the server.


after that i 
stopped the server ... and copied my site (instance folder) from the other computer over this one. 



when i start /etc/init.d/zope2.9 start ... it doesn't complain , but i 
can't open the site. (same instance names, same port number )


Use 'zopectl fg' to run it in the foreground and see what errors you get.

i tryied another aproach ... copied back the default installed instance 
... and only overwritten the var folder with the data from the original 
site.


this way i hoped that Data.fs which contained all my objects ... will 
automatically become visible.


it doesn't work this way either, it only sees the default objects, i can 
access the site ... but all my objects are not visible.


It's generally much more helpful if you say exactly what is not 
"visible" -- and where. As is, this is pretty much information-free.


grep shows that the names of the objects & folders are still in Data.fs 
... so they exist ... i think i missed one configuration somewhere ... 
to make the folders added by me visible.


do you know how can i achieve that?


You may be missing a Product. Visit the Zope Control Panel and look for 
a "broken box".


Alternately, are there broken object icons in the ZMI for those objects 
which are not "visible"?


--jcc

--
Connexions
http://cnx.org

"Building Websites with Plone"
http://plonebook.packtpub.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 products that allows people to Add Comments to publications

2007-06-26 Thread Thomas Bennett
I have been wanting to try a SquishDot site also and get the very same error.

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module App.special_dtml, line 65, in __call__
  Module DocumentTemplate.DT_String, line 476, in __call__
TypeError: unbound method mailhost_list() must be called with SquishSite 
instance as first argument (got nothing instead)

Zope Version(Zope 2.10.3-final, python 2.4.3, linux2) 
Python Version  2.4.3 (#1, Mar 14 2007, 18:51:08) [GCC 4.1.1 20070105 (Red Hat 
4.1.1-52)] 
System Platform linux2 
SOFTWARE_HOME   /var/zope/lib/python 
ZOPE_HOME   /var/zope 
INSTANCE_HOME   /var/zope 
CLIENT_HOME /var/zope/var 
Network ServicesZServer.HTTPServer.zhttp_server (Port: 8082)
ZServer.HTTPServer.zwebdav_server (Port: 9800)


Thomas



On Monday 25 June 2007 19:03, kamal hamzat wrote:
> hi Tom,
>
> I have this error when add squishdot from ZMI
>
> Error Type: TypeError
> Error Value: unbound method mailhost_list() must be called with SquishSite
> instance as first argument (got nothing instead)
>
>
> Traceback (innermost last):
>
>   a.. Module ZPublisher.Publish, line 119, in publish
>   b.. Module ZPublisher.mapply, line 88, in mapply
>   c.. Module ZPublisher.Publish, line 42, in call_object
>   d.. Module App.special_dtml, line 65, in __call__
>   e.. Module DocumentTemplate.DT_String, line 476, in __call__
>
> Thanks
>   - Original Message -
>   From: Tom Von Lahndorff
>   To: kamal hamzat
>   Cc: zope@zope.org
>   Sent: Monday, June 25, 2007 8:14 PM
>   Subject: Re: [Zope] Zope products that allows people to Add Comments to
> publications
>
>
>
>
>   check out http://www.squishdot.org
>
>
>   On Jun 25, 2007, at 3:00 PM, kamal hamzat wrote:
>
>
> Hello,
>
> Is there any zope product that allows visitors to Add Comments to the
> news / articles, just like the one in plone.
>
> Thanks
> ___
> 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 )

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Operations & Systems AnalystP O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

They say a picture is worth a thousand words.  As videos could be 25 pictures 
per second and might last several minutes, how many words is that? 
- Linux Journal, July 2007

Library Systems Help Desk: http://www.library.appstate.edu/help/

___
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] New class, no access to manage_propertiesForm etc.

2007-06-26 Thread Winterflood, Jonathan

Hi,

 

I have created a new class in my product, but I can't access the
PropertyManager pages for it:

 

import Persistence

from OFS.PropertyManager import PropertyManager

 

# Zope security infrastructure

from Globals import InitializeClass

from AccessControl import ClassSecurityInfo

 

class MyClass(Persistence.Persistent,PropertyManager):

"""

L'objet d'interfacage

"""

 



# Properties are default are persistent typed attributes with
builtin form

# management in the ZMI

_properties = (

{'id':'remote_email', 'type':'string', 'mode': 'w'},

{'id':'local_email', 'type':'string', 'mode': 'w'},

) 

# default values

remote_email = ''

local_email = ''

 

# Tabs that are displayed in the ZMI (inherited from the base
classes)

manage_options = (PropertyManager.manage_options)



# Let me see those pages

__ac_permissions__=(('Manage properties', ('manage_addProperty',

   'manage_editProperties',

   'manage_delProperties',

 
'manage_changeProperties',

   'manage_propertiesForm',

 
'manage_propertyTypeForm',

 
'manage_changePropertyTypes',

   )

   ))



def __init__(self):

pass 



security = ClassSecurityInfo()

security.declarePublic('show')

def show(self):

return str(self)

 

InitializeClass(MyClass)

 

 

An instance of this class is held as an attribute of a tool in the
product.

 

class DBRTool(UniqueObject, SimpleItem, ActionProviderBase,
PropertyManager):

"""Tool for some logic of the DBR site"""

def __init__(self): 

# interfacage

self.myInstance = MyClass()

 

Accessing http://.../portal_dbrtool/myInstance shows str(myInstance),
but http://.../portal_dbrtool/myInstance/manage_propertiesForm
  shows "You
are not authorized to access this resource."  After a login that cannot
be satisfied.

 

The manage_options and __ac_permissions__ are set according to the
instructions in PropertyManager. 

 

Where am I going wrong? How can I access these pages?

 

TIA,

Jonathan

 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.
___
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 restore a copied instance.

2007-06-26 Thread Maciej Wisniowski

> hi, i needed to reinstall my zope site on another computer so i
> installed (in debian) plone-site using aptitude ... it automatically
> makes a new instance and starts the server.
Is this the same Zope version that you have on another computer?


>
> after that i
> stopped the server ... and copied my site (instance folder) from the other 
> computer over this one.
>
>
> when i start /etc/init.d/zope2.9 start ... it doesn't complain , but i
> can't open the site. (same instance names, same port number )
What does this mean that you can't open the site? Errors?

>
> i tryied another aproach ... copied back the default installed
> instance ... and only overwritten the var folder with the data from
> the original site.
You also need Products/ from previous instance and files from
Extensions/ folder

>
> this way i hoped that Data.fs which contained all my objects ... will
> automatically become visible.
>
> it doesn't work this way either, it only sees the default objects, i
> can access the site ... but all my objects are not visible.
Check ControlPanel->Product Management if your products are installed
correctly


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