Re: [Zope3-Users] newbie need help, how to write nested zcml directive?

2009-12-03 Thread Shailesh Kumar
IIRC, ZCML doesn't support directives below 2 levels. So your 5 level nested XML couldn't be supported in ZCML. A way around could be as follows: 1 1 In the above middleware and app are directives supporting child directive param. - Shailesh On Thu, Dec 3, 2009 at 11:07 PM, lucif

Re: [Zope3-Users] Resource lookup by resource name

2009-10-17 Thread Shailesh Kumar
Hi Andreas, I had a requirement where I needed to manage the resource directories dynamically. So I developed some of following code. I guess this might be of help. """ Functions to work with browser resources at run time """ #python imports import logging # zope imports from zope.publisher.int

Re: [Zope3-Users] Data.fs corrupted.

2009-09-03 Thread Shailesh Kumar
This is great. Thanx a lot.. - Shailesh On Fri, Sep 4, 2009 at 11:27 AM, Andreas Jung wrote: > Look at this: > > http://spamsch.blogspot.com/2009/04/how-to-repair-broken-zodb-poskeyerror.html > > -aj > > On 04.09.09 07:53, Shailesh Kumar wrote: >> Hello, >> A

[Zope3-Users] Data.fs corrupted.

2009-09-03 Thread Shailesh Kumar
Hello, At one of our client installations, we faced the following: File "C:\python24\lib\site-packages\ZODB\FileStorage\FileStorage.py", line 173 5, in read_index name, pos) File "C:\python24\lib\site-packages\ZODB\FileStorage\FileStorage.py", line 52, in panic raise CorruptedTransact

Re: [Zope3-Users] Eclipse + PyDev + deferred imports

2009-08-11 Thread Shailesh Kumar
I certainly agree :) My workaround plan is to use a global search on ._api in my codebase and remove them when I move on from 3.3.1 to later version. - Shailesh On Wed, Aug 12, 2009 at 6:18 AM, Martin Aspeli > wrote: > Shailesh Kumar wrote: > > I generally make it /from zope.co

Re: [Zope3-Users] Eclipse + PyDev + deferred imports

2009-08-10 Thread Shailesh Kumar
I generally make it *from zope.component._api import getUtility* to make PyDev happy. It doesn't hurt the code and I don't have to see the 'unresolved import message'. This is even worse when importing reactor from twisted and using its methods. - Shailesh On Tue, Aug 11, 2009 at 10:25 AM, andr

Re: [Zope3-Users] How do I learn how to use Zope?

2009-06-16 Thread Shailesh Kumar
Hello, I am trying to summarize some of what happened over last few years from my perspective. I am just a zope 3 user and not involved with core development. So my knowledge is limited. Zope 3.3 was good. It was a big monolithic package containing most of what was necessary to develop component b

Re: [Zope3-Users] Multi platform dev environment

2009-06-01 Thread Shailesh Kumar
rg/ With regards, - Shailesh On Tue, Jun 2, 2009 at 6:12 AM, Edward Zwart wrote: > On Sat, May 30, 2009 at 12:00 AM, Shailesh Kumar > wrote: > > Web component development with Zope 3 by Philipp von Weitershausen has > been > > my best resource on zope 3 developement a

Re: [Zope3-Users] Wiki proposal

2009-05-30 Thread Shailesh Kumar
Hello, I had seen a site new.zope.org coming up sometime back which was using Sphinx for the documentation of Zope 3. Though there was never a public announcement of the website on this mailing list. The approach seemed promising. It somehow supported integration of work from multiple contributer

Re: [Zope3-Users] Multi platform dev environment

2009-05-30 Thread Shailesh Kumar
Hello, I have been using Zope 3 primarily on Windows platforms for last 2.5 years. This is what I do for the typical setup: - Install Python 2.4.4 - Install Python for Windows extensions for Python 2.4 - Install Zope 3.3.1 (the binary installer) - Go to C:\Python24\Scripts - Use mkzopeinstance s

Re: [Zope3-Users] Search multiple fields with TextIndex

2009-02-13 Thread Shailesh Kumar
please have a look at AttributeIndex mixin. http://apidoc.zope.org/++apidoc++/Book/indexcatalog/catalog/show.html Having 3 different Attribute Indices might be a better idea than 3 different Text Indices. With regards, - Shailesh On Fri, Feb 13, 2009 at 10:33 PM, Massimiliano della Rovere < ma

Re: [Zope3-Users] Interface confusion (still)

2008-07-15 Thread Shailesh Kumar
Hi, I believe not. In any case, implements, provides and such things are more like indications of what is being supported by a class and they are not enforced by runtime strictly. I just tried following: # from zope.component i

Re: [Zope3-Users] Disabling authentication for resources

2008-07-09 Thread Shailesh Kumar
nts for deep into the internals > of IAuthentication. If you need a simpler implementation, > take a look at z3c.authenticator. > > > Regards > Roger Ineichen > > > > > On Tue, 2008-07-08 at 22:52 -0700, Shailesh Kumar wrote: > > > Did you try the re

Re: [Zope3-Users] Disabling authentication for resources

2008-07-08 Thread Shailesh Kumar
Did you try the resourceDirecotry ZCML directive? that way they don't need the authentication overhead. On 7/8/08, andrew <[EMAIL PROTECTED]> wrote: > > Hi All, > > I've got a web application that uses pluggable authentication, but I > don't want the overhead of authentication for public resou

Re: [Zope3-Users] OOBtrees & ZODB

2008-07-08 Thread Shailesh Kumar
BTreeContainer doesn't support site managers. Folder is a subclass of SiteManagerContainer which is a subclass of BTreeContainer. You can happily use Folder here. With regards, - Shailesh On 7/8/08, Tim Cook <[EMAIL PROTECTED]> wrote: > > I am building a platform where I want to initialize th

Re: [Zope3-Users] Cannot install Zope 3.3.0 as a Windows Service

2008-07-07 Thread Shailesh Kumar
one2.5.5\Python\lib\site-packages\PIL > > * C:\Program Files\Plone2.5.5\Python\lib\site-packages\win32 > > * C:\Program Files\Plone2.5.5\Python\lib\site-packages\win32\lib > > * C:\Program Files\Plone2.5.5\Python\lib\site-packages\Pythonwin > > * C:\Program Files\Plone2.5.5\P

[Zope3-Users] Job opening (Noida, India)

2007-12-21 Thread Shailesh Kumar
Hi, I apologize for posting on this list. I am posting here because I do not know where else to post. We at Interra Systems (Noida, India) are looking for one Zope3 engineer for a full time position. Anyone interested may please write directly to me. With regards, - Shailesh ___

Re: [Zope3-Users] A question regarding zope generations

2007-11-18 Thread Shailesh Kumar
Thanks Bernd, I am working around this issues as you have suggested. - Shailesh On Nov 17, 2007 5:31 PM, Bernd Dorn <[EMAIL PROTECTED]> wrote: > > On 16.11.2007, at 13:56, Shailesh Kumar wrote: > > > As of now, I am thinking of a following solution. For the current u

[Zope3-Users] A question regarding zope generations

2007-11-16 Thread Shailesh Kumar
Hi, I have a small doubt regarding zope3 generations. In the current way of doing things: - one should first put a dummy schema manager, restart the zope, so that a generation 0 is assigned to the application. - one should then put the actual site specific schema manager which would use the evolu

Re: [Zope3-Users] dynamicall javascript and css generation

2007-10-08 Thread Shailesh Kumar
Probably z3c.zrtresource might be of some use? http://svn.zope.org/z3c.zrtresource/trunk/src/z3c/zrtresource/README.txt?rev=69512&view=auto - Shailesh On 10/8/07, Yuan HOng <[EMAIL PROTECTED]> wrote: > > Hi, > > How do I dynamically generate javascript and css files and how to register > them?

Re: [Zope3-Users] xmlrpc access with PAU

2007-08-18 Thread Shailesh Kumar
Hi, apart from Session Credentials, I would also have Zope Realm Basic-Auth in my credentials plugin (as the last one). For the normal browser based access, the session credentials plugin does the work. For XMLRPC access, I fall back on 'Zope Realm Basic-Auth'. The URL for XMLRPC server proxy w

Re: Re[2]: [Zope3-Users] possible bug in zope\app\authentication\principalfolder.py

2007-08-10 Thread Shailesh Kumar
Thanx a lot Adam and Christian. With regards, -Shailesh On 8/10/07, Christian Theune <[EMAIL PROTECTED]> wrote: > Hi, > > Am Donnerstag, den 09.08.2007, 14:32 +0530 schrieb Shailesh Kumar: > > Hi, > > > > Just another quick question on this. Is there any plan fo

Re: Re[2]: [Zope3-Users] possible bug in zope\app\authentication\principalfolder.py

2007-08-09 Thread Shailesh Kumar
Hi, Just another quick question on this. Is there any plan for new bug fix releases of 3.3 branch? or Will the next releases be on the 3.4 branch? With regards, -Shailesh On 8/9/07, Adam Groszer <[EMAIL PROTECTED]> wrote: > Hello Shailesh, > > As I remember the fix was later. > > Thursday, Augu

Re: [Zope3-Users] possible bug in zope\app\authentication\principalfolder.py

2007-08-09 Thread Shailesh Kumar
I have Zope 3.3.1 the official release. With regards, -Shailesh On 8/9/07, Adam Groszer <[EMAIL PROTECTED]> wrote: > Hello Shailesh, > > Which version of Z3 re you using? > As I remember that was fixed, but I can't dig the info from SVN. > > Tuesday, August 7, 2007, 5:28:02 PM, you wrote: > > >

[Zope3-Users] a question about zope.app.security.principallogging.PrincipalLogging

2007-08-08 Thread Shailesh Kumar
Hi, zope.app.security.principallogging.PrincipalLogging looks like: class PrincipalLogging(object): implements(ILoggingInfo) def __init__(self, principal): self.principal = principal def getLogMessage(self): return str(self.principal.id) It requires that self.prin

[Zope3-Users] possible bug in zope\app\authentication\principalfolder.py

2007-08-07 Thread Shailesh Kumar
Hi, I was using InternalPrincipal object and specified a password with non-ascii characters. Since Password is derived from TextLine, hence its supposed to be acceptable. But I found that if I use MD5 or SHA1 password managers, it leads to problems. The following exception is thrown. I guess the

Re: [Zope3-Users] [Zope3.0] How to unregister an utility?

2007-06-09 Thread Shailesh Kumar
May be I am wrong. Didn't read the question properly ! Don't know about Zope 3.0. On 6/9/07, Shailesh Kumar <[EMAIL PROTECTED]> wrote: from zope.component.globalregistry import getGlobalSiteManager gsm = getGlobalSiteManager() gsm.unregisterUtility(component=None, provi

Re: [Zope3-Users] [Zope3.0] How to unregister an utility?

2007-06-09 Thread Shailesh Kumar
from zope.component.globalregistry import getGlobalSiteManager gsm = getGlobalSiteManager() gsm.unregisterUtility(component=None, provided=None, name=u'') Would that help? With regards, -Shailesh On 6/9/07, Andreas Jung <[EMAIL PROTECTED]> wrote: I have an application where I need to

[Zope3-Users] database ConflictError with SessionData objects

2007-05-17 Thread Shailesh Kumar
Hi, I am using PersistentSessionDataContainer (registered as a site specific utility), and at times I get this error: 2007-05-17T18:50:00 WARNING ZopePublication Competing writes/reads at /SomeURL/AllTasksTableView.html Traceback (most recent call last): File "C:\Python24\Lib\site-packages\zope

[Zope3-Users] question about scheduler package

2007-05-17 Thread Shailesh Kumar
Hi, I was using scheduler package for some background work. It works fine when the zope is run using twisted server. But when I tried it with zserver backend, the scheduler doesn't seem to be working. Is there something specific that I need to do to make the scheduler package work with zserver b

[Zope3-Users] Re: how to get access to configuration context in Python?

2007-03-20 Thread Shailesh Kumar
TED]> wrote: Shailesh Kumar wrote: > Hi, > > I ran into this small problem. > > I had added a > > > This works fine for controlling ZCML directives. ... and that's what it was meant for. > Now at some places in my Python code, I would like to query whether >

[Zope3-Users] how to get access to configuration context in Python?

2007-03-20 Thread Shailesh Kumar
Hi, I ran into this small problem. I had added a This works fine for controlling ZCML directives. Now at some places in my Python code, I would like to query whether afeature is available or not. What is the way to access this? Looking at ZMCL documentation of meta:provides, I could figure o

[Zope3-Users] default page based on roles?

2007-02-28 Thread Shailesh Kumar
Hi, Is it possible to control the default page for a particular object based on the roles/permissions that a user has? The browser:defaultPage directive as such doesn't support this. Will I have to write a custom traverser or something like that for this? Thanx in advance. With regards, -Shai

[Zope3-Users] Re: question about request.locale and creation time

2007-01-15 Thread Shailesh Kumar
r way? With regards, -Shailesh On 1/15/07, Shailesh Kumar <[EMAIL PROTECTED]> wrote: Sorry, the mail went only to Philipp by mistake. Hi Philipp, Thanx for the pointers. I went through the sections of your book regarding this. I guess I now understand my problem better. The problem is abo

[Zope3-Users] Fwd: question about request.locale and creation time

2007-01-15 Thread Shailesh Kumar
be the UTC time stamps, and I want the display to be according to local time zone. How can I do it? With regards, -Shailesh On 1/14/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Shailesh Kumar wrote: > Hi, > > When I look at the Creation time and Modification tim

[Zope3-Users] question about request.locale and creation time

2007-01-13 Thread Shailesh Kumar
Hi, When I look at the Creation time and Modification time in any of the container views, it shows me the UTC time. Looking at zope.app.container.browser.contents.py: Line 174 I found that: formatter = self.request.locale.dates.getFormatter( 'dateTime', 'short')

Re: [Zope3-Users] ConnectionStateError when a worker thread finishes

2007-01-08 Thread Shailesh Kumar
work well. With regards, -Shailesh On 1/8/07, Stephan Richter <[EMAIL PROTECTED]> wrote: On Wednesday 03 January 2007 05:46, Shailesh Kumar wrote: > In my application, some background threads are being created. But when a > thread finishes up its work, a strange exception is t

[Zope3-Users] ConnectionStateError when a worker thread finishes

2007-01-03 Thread Shailesh Kumar
Hi, In my application, some background threads are being created. But when a thread finishes up its work, a strange exception is thrown: The callstack doesn't show any part of my application code. = Traceback (most

[Zope3-Users] server shutdown event

2006-12-01 Thread Shailesh Kumar
Hi, I wanted to do some cleanup activities during the time of server shutdown. Couldn't find any particular event that is sent at that time. But looking at: zope.app.main.main, i tried: from twisted.internet import reactor def shutdown(): #shutdown code here. pass reactor.addSystemEventTrig

Re: [Zope3-Users] how to know which port zope is runnning on?

2006-11-29 Thread Shailesh Kumar
le as such (I couldn't figure out how it can be accessible). Probably I can get it by parsing zope.conf again in my code. With regards, -shailesh On 11/29/06, Chris Withers <[EMAIL PROTECTED]> wrote: Shailesh Kumar wrote: > Thanx for the hint. I still don't know how to pro

Re: [Zope3-Users] how to know which port zope is runnning on?

2006-11-28 Thread Shailesh Kumar
Thanx for the hint. I still don't know how to programmatically access the event log. will try to figure it out. With regards, -shailesh On 11/28/06, Chris Withers <[EMAIL PROTECTED]> wrote: Shailesh Kumar wrote: > Thanx Tom, but I was looking for the general case, not in th

Re: [Zope3-Users] how to know which port zope is runnning on?

2006-11-28 Thread Shailesh Kumar
SERVER_PORT'). Cheers -Tom Shailesh Kumar wrote: > Hi, > > Is it possible for the application code to figure out the port number > on which zope is running? What is the suitable api for that? &

[Zope3-Users] how to know which port zope is runnning on?

2006-11-28 Thread Shailesh Kumar
Hi, Is it possible for the application code to figure out the port number on which zope is running? What is the suitable api for that? With regards, -shailesh ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3

[Zope3-Users] Re: how is ++etc++site view created?

2006-11-25 Thread Shailesh Kumar
Sorry for bothering with the question. I figured it out. the vm was an object derived from Folder() but not a Folder() object. So probably certain permissions were not working probably. Things work fine on a normal Folder() object. With regards, -shailesh On 11/25/06, Shailesh Kumar <[EM

[Zope3-Users] how is ++etc++site view created?

2006-11-25 Thread Shailesh Kumar
Hi, I was trying the following. During the startup I caught the IDatabaseOpenedWithRootEvent. I created a folder inside the root, and then setup the folder as a site by using: sm = site.LocalSiteManager(vm) vm.setSiteManager(sm) # vm is basically now http://localhost:8080/vm Following th

Re: [Zope3-Users] how to access the root folder in normal operation

2006-11-17 Thread Shailesh Kumar
Thank you very much. This technique works perfectly. -shailesh On 11/17/06, Thierry Florac <[EMAIL PROTECTED]> wrote: Le vendredi 17 novembre 2006 à 16:59 +0530, Shailesh Kumar a écrit : I currently use something like this, to handle a site configuration on startup (define catalog i

Re: [Zope3-Users] how to access the root folder in normal operation

2006-11-17 Thread Shailesh Kumar
der() root['var'] = Folder() ... Is it possible to do that? With regards, -shailesh On 11/15/06, Tom Gross <[EMAIL PROTECTED]> wrote: Hi Shailesh, have a look at zope.traversing.api. There's a getRoot-method. Cheers -Tom Shailesh Kumar wrote: > Hi, > > In a function

[Zope3-Users] question about MailDir folder for queuedDelivery on windows

2006-11-17 Thread Shailesh Kumar
Hi, I am trying to use mail:queuedDelivery. It says that the *...\lib\python\baton\mail_queue is not a Maildir folder* I am using Zope on Windows-XP box. How can I setup a Maildir folder? With regards, -shailesh ___ Zope3-users mailing list Zope3-user

[Zope3-Users] how to access the root folder in normal operation

2006-11-15 Thread Shailesh Kumar
Hi,   In a functional test setup, one can access the root folder using getRootFolder() of FunctionalTestSetup.   How  can I access the root folder in a nomal operation mode? Is there some mechanism to do that?   Thank you very much.   With regards, -shailesh         _

[Zope3-Users] question about ftesting.zcml

2006-11-10 Thread Shailesh Kumar
Hi, A small question about functional testing. What is the purpose of ftesting.zcml ? Do I need to put something in this file for running functional tests? Or it needs to have just ? Thanx in advance. With regards, -shailesh ___ Zope3-users mailing

[Zope3-Users] questions about placelesssetup

2006-11-09 Thread Shailesh Kumar
Dear zope experts, I have some doubts regarding the working of placelesssetup. I am not familiar with its workings. Is it ok to run a placelesssetup when a zope instance is already running? Does it create its own site structure in memory? (I saw a buildSampleFolderTree in zope.app.testing.set

Re: [Zope3-Users] Re: how to get zope shutdown event and do some actions at that time?

2006-11-08 Thread Shailesh Kumar
Thank you Phillip, Just for curiosity, is this zc.async package always going to be a third party or is there any plan of making the package part of regular zope distribution? With regards, -shailesh On 11/8/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Shailesh Kumar wrote:&

[Zope3-Users] Re: how to get zope shutdown event and do some actions at that time?

2006-11-07 Thread Shailesh Kumar
One way I can do it is by registering a utility whose __del__( self) method is overridden. Is it a recommended method? With regards, -shailesh On 11/8/06, Shailesh Kumar <[EMAIL PROTECTED]> wrote: Dear zope experts, In my zope based application, I want to do some periodic acti

[Zope3-Users] how to get zope shutdown event and do some actions at that time?

2006-11-07 Thread Shailesh Kumar
Dear zope experts, In my zope based application, I want to do some periodic actions. I couldn't find out any timer kind of facility in zope. I was thinking that I could start a thread in the beginning which would work as a timer and create an event on periodic basis. Different subscribers to the

[Zope3-Users] Logout button missing in ZMI

2006-11-06 Thread Shailesh Kumar
Hi, I don't know what I did but I cannot find the logout button in my ZMI. So, I am not able to change login without closing the browser. Is there something which enables or disables this button in ZMI? All help is appreciated. With regards, -shailesh ___

[Zope3-Users] some basic questions about utility

2006-11-05 Thread Shailesh Kumar
Hi all, Could you please clarify some basic doubts about the usage of utilities? Here they are. Suppose I have registered a utility using ZCML directive in my web application. Is the utility created the moment zope starts up, during the parsing of my app's ZCML? Can I think of it as a singlet

[Zope3-Users] A system error occurred message

2006-11-04 Thread Shailesh Kumar
Hi all, I am a new zope3 user. I am running zope3 in developer mode with runzope command. A number of times (off course when I am doing something wrong) it happens that zope3 gives a blank page with just one line information: 'A system error occurred' Is there some mechanism to be able to see mo