[Zope-CMF] Re: Adding EXTENSIONs after site creation

2006-06-29 Thread suresh

Doyon, Jean-Francois wrote:

Yes, by both I mean I check one box in the Import tab, and 2 things show
up.  I select one extension, and the 2 extensions defined against that
particular interface show up.


Have you looked at Rob Miller's tutorial of GS on plone.org? What you 
describe seems very much like the gotcha he describes.


--
Thank you and Cheers,

Suresh V.
CTO, ParTecs, Bangalore
http://www.partecs.com
Plone-Zope-Python Consulting

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: monkey patching CMFCore.utils isn't working?!?

2006-06-22 Thread suresh

Tres Seaver wrote:

Florent Guillaume wrote:


It might be possible to monkey patch only _checkPermission.func_code, 
which seems to work on simple tests, but I've never tried it in real 
life:


  def f(a):
... print a+1

  def g(b):
... print b+2

  f(0)
1
  f.func_code = g.func_code
  f(0)
2


Heh, I thought about that, and then decided that tha voodoo factor was 
too high to suggest.




This is voodoo at its best :) Will bookmark this for later!

--
Thank you and Cheers,

Suresh V.
CTO, ParTecs, Bangalore
http://www.partecs.com
Plone-Zope-Python Consulting

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: urllib in /skin/, Unauthorized: You are not allowed to access 'quote' in this context

2006-02-24 Thread suresh

Hans Schou wrote:

Hi

First question: Is this the proper list to ask for this kind of questions?

THE question:

I have a script in Products/PloneMallPayment/skins/PloneMallPayment_public/
and I want to:

   import urllib
   foo = urllib.quote(hello world)

Unauthorized: You are not allowed to access 'quote' in this context

I already use an import re and re.split and it works fine, So why 
can I not use urllib?




you have to:

allow_module('urllib')

See the documents in the PythonScripts Products folder.

--
Suersh

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests