KLEIN Stéphane wrote:
I search information about CMFCore class DirectoryRegistry. What is it ?
How use it ? ... Where can I found information about it ?
Here's a better question:
Why do you want to know how to use it?
cheers,
Chris
--
Simplistix - Content Management, Zope Python Consulting
Well, the source code is it.
You don't need to worry about any of these though, if you just want to
change and add some fields..
cheers,
Chris
KLEIN Stéphane wrote:
Chris Withers a écrit :
KLEIN Stéphane wrote:
I search information about CMFCore class DirectoryRegistry. What is
it ? How use
Hi Florent,
Florent Guillaume wrote:
I deliberately didn't use a LOG call, because this line will get
executed for every request if there is an old directory view present,
and it'll fill your logs pretty quickly, which is not acceptable.
Well, what's acceptable or not is a matter of opinion
Dinh Trung Viet wrote:
It seems that Portal Image cannot display the image when it was set as
default page i.e. id = index_html. Anyone has the same problem before?
I'm using Plone 2.0.5.
Go ask on the plone list then ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope Python
Dieter Maurer wrote:
You asked for this a long time ago and I responded (a long time ago!):
You turn the warning (all of them, if you like) into exceptions
and you get a nice traceback.
You find details in the description of the Python (command) options
or the module warnings.
OK.
Tres Seaver wrote:
Exactly. The point is that the adverse effect *already happened*, in
some prior request, probably due to one of Chris' beloved hasattrs ;).
The current request should *not* be prevented from continuing.
Why not?
Chris, take this as a fiat: this one will *never* turn into
Laurence,
Could you stick this in the collector so it doesn't get forgotten please?
cheers,
Chris
Dieter Maurer wrote:
Laurence Rowe wrote at 2005-8-22 17:04 +0100:
...
I often define several skins, and after a while they get a little
complicated (I'm using Plone ;-) So in order to make
Julien Anguenot wrote:
The refactoring was obsious and harmless right ? Just removing hardcoded
references to portal_catalog and portal_workflow within the internals
of CMFCatalogAware.
Well, that's not refactoring is it? You've added new functionality with
the intent of allowing a new
Tres Seaver wrote:
Note that the goal with unit tests is to use the *smallest possible
fixture*; using PortalTestCase when you could equally well use
RequestTest reduces the usefulness of the test:
- it runs slower (the nibbled to death by ducks effect, particularly
when re-running the
Zope Debugger is an enhanced version of pdb for use with Zope.
It can be used simply by inserting the following lines in any python
code you'd like to debug, including Script (Python)'s and FSPythonScripts:
from Products.zdb import set_trace
set_trace()
It requires no changes to Zope, CMF or
Stefan H. Holek wrote:
I see two options:
a) Use a different portal name
portal_name = 'mysite'
CMFTestCase.setupCMFSite(portal_name)
Can setupCMFSite not do something more clever if it finds the object
already there?
b) Use getPortal() to create a new portal per test
def
Paul Winkler wrote:
Aha! I just confirmed that it works as you say in zopectl debug.
(You do have to first make sure that the portal has a REQUEST attribute.)
Yeah, I believe the canonical way is:
from Testing.makerequest import makerequest
portal = makerequest(self.portal)
OK, so I misunderstood the actual problem Paul was reporting...
Can someone explain it for a stupid person like me? ;-)
Chris
Stefan H. Holek wrote:
Oh, setupCMFSite is sufficiently clever, it's the CMF tests that aren't
;-)
Stefan
On 5. Okt 2005, at 10:45, Chris Withers wrote:
Stefan
Sidnei da Silva wrote:
CMF seems to create expression contexts in two places off the top of
my head: In 'CMFCore/Expression.py' and
'CMFCore/CachingPolicyManager.py'. None of those define 'here' or
'context' but instead just 'object'.
I believe one of those two now has context defined in svn
Deb Lewis wrote:
Configuration: Zope 2.7.7, CMF 1.4.8; also GRUF (GroupUserFolder) 3.3
Why are you using such old and crufty software?
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
___
robert rottermann wrote:
do you have SpeedPack installed?
You could always remove that garbage ;-)
Frostbite is likely going to be a bigger win, and better written too...
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
yuppie wrote:
def __call__(self):
if self.isTuesday():
return ZopeTwoPageTemplateFile('tuesday.pt').__of__(self)()
return self.index()
Surely the following is going to be better?
tuesday_pt = ZopeTwoPageTemplateFile('tuesday.pt')
def __call__(self):
Tim Peters wrote:
Note: sometimes _internals_ use deprecated gimmicks in order to
support deprecated gimmicks too, and then stacklevel=3 is too small.
It's happened so rarely in ZODB that I haven't tried to do something
about that yet.
Interestingly, I've found that even this is sometimes
yuppie wrote:
getActionObject(action_path) is the method you are looking for.
getActionById is defined as public, getActionObject as private, so you
can't use it in any skin scripts or templates :-(
Can't see why you would need that method in the skins.
Okay, so how would you get the
yuppie wrote:
This is in a completely set up Plone site? Could you please try to debug
those values while we are still in customizePortalTypes?
Okay, in there, it's just the normal Plone types, which we don't use.
And yes, their _aliases dict appears to have 'view' keys which map to
the
Floyd May wrote:
I have a set of files - page templates, python scripts, and zsql
methods - that are set up as filesystem objects. I'm having trouble
getting the security set the way I want it to be with the .metadata
files. Here is the content of my .metadata files:
BIll Anderson wrote:
Ok, so it's clearly been quite some time since I've done any CMF stuff.
Obviously these are not part of Metadata OOTB. What would be the
simplest way to add the ability to set/change these? I'd prefer to be
able to have them set during the creation process and must be able
Florent Guillaume wrote:
Could folks having old CMF branches clean them up ?
Why, what's the problem with them?
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
___
Zope-CMF maillist -
Tres Seaver wrote:
Log message for revision 40036:
Avoid using __file__ where possible.
Why? I use this all over the place so need to know why it's bad ;-)
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
Jens Vagelpohl wrote:
There could be a multiplexer that logs to the standard Zope event log
*and* keeps the messages in a memory buffer to be displayed in the
browser. This could be done in a separate class or a logging API could
be added to ISetupContext. Should be easy to do, really.
Hi All,
Asking here 'cos I'm sure I saw someone talking about this recently.
I'm unit testing something which does some logging. It's supposed to
log, so ideally I'd like to test for that, but I'd also like to not have
the log spew showing during tests runs, which seems to have started
Alec Mitchell wrote:
to start using it immediately or risk strange breakages. Maintaining
product compatibility between versions of CMF/Plone will become nearly
impossible.
I'm sorry, I really couldn't resist this...
And that differs from other Plone releases how exactly? ;-)
Chris
--
yuppie wrote:
Or would be 'GenericSetup.content' enough?
Yes, that looks nicer to me :-)
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
___
Zope-CMF maillist - Zope-CMF@lists.zope.org
Alexander Limi wrote:
And that differs from other Plone releases how exactly? ;-)
And what, exactly, have you done to help Plone have less bugs?
*sigh* there's not a lot I can do, the problems with Plone are cultural.
There seems to be a pervasive culture of monkey patching and
Answering my own question and cc'ing Vinay in since I was also talking
to him about this...
Chris Withers wrote:
I'm unit testing something which does some logging. It's supposed to
log, so ideally I'd like to test for that, but I'd also like to not have
the log spew showing during tests runs
Hi Alec,
Alec Mitchell wrote:
So, Sidnei has been plugging away at the AT reindexes things an obscene
number of times issue today, and appears to have fixed many of the AT
triggered indexing redundancies.
Where is this work being done? I'd be very interested to track it...
*)
Florent Guillaume wrote:
That's certainly a good hack. There are several ways to do it, either
with a thread-local variable, or in the request, or by walking the
stack's locals to check for a __dont_index__ attribute... You'd have to
bench, but a thread-local variable is probably the fastest.
Julien Anguenot wrote:
yup you're right. We do define this already. All the subscribers can run
'async' or 'sync' . Check the base interface for those subscribers there :
http://svn.nuxeo.org/trac/pub/file/CPSCore/trunk/interfaces.py
Julien Anguenot wrote:
If you want a flush, following what I think I understood you mean ;), we
use the transaction.commit() in the tests when needed.
Okay, but then how do you undo the changes made by that commit?
Also, how would you go about overriding this late-indexing behaviour if
you
Julien Anguenot wrote:
Can you gimme a use case, within a test, where the interface we define
in CPS would not be enough for you ? In our CPSTestCase we set all
subscribers to 'async' and then all works as if no txn subscribers
exists during the tests.
Ah, okay, yes, I guess this is one way to
Florent Guillaume wrote:
Or even better:
self._logger.info(%r type info imported. % self.context.getId())
Or you could even take advantage of the good work done by the python
logging people ;)
self._logger.info(%r type info imported.,self.context.getId())
cheers,
Chris
--
Simplistix -
yuppie wrote:
1.) It would be nice to have a policy for Zope. If the Zope core
officially supports the BLATHER level (not just in the deprecated zLOG
module) I'm fine with using it in GenericSetup as well.
It doesn't, ZODB has a mapping for it but it's a stupid name left over
from before the
yuppie wrote:
By 'broken setups' I meant e.g. if you loose some catalog indexes on
export/import because no handler exists for those index classes. This is
a problem you should know about, but maybe you don't care or you fix
that by hand.
Ah, okay, I kinda agree here, and don't feel strongly
Hi Tres,
Tres Seaver wrote:
No, it isn't, at least in Zope. BLATHER is intended to be summary
information, useful for developers but not important enough to show by
default. DEBUG is for more detailed information, and TRACE is for
completely overwhelming detail.
Show me the docs in zope
yuppie wrote:
2.) Switch completely to unicode in CMF 2.0:
Sounds like a too big change, don't think we should try that.
I think we all know this is where we need to be eventually, 2.0 seems
the right time to do that, I'd actually prefer this, even though it'll
delay the 2.0 release...
Martin Aspeli wrote:
Alec Mitchell's plone_schemas product lets you use such types in Plone,
though he derives from CMF's PortalContent (as I recall) and manually
constructs an FTI.
FWIW, I think this is an exceptionally bad idea.
I'd much prefer to see CMF grow a way to use Z3 content types
Lennart Regebro wrote:
Nope, that's not equivalent. I'm not exactly sure what the
requirements are. A getId method, a title attribute and a meta_type
probably. Subclassing from SimpleItem is definitely a good idea.
...appart from the lame-ass allow by default security policy it drags
in along
Jens Vagelpohl wrote:
From the old testrunner, which I miss *a lot*, I could ensure I am
indeed running a specific module by doing...
Yup, this is one of the things I like least from the Zope 3 world. What
happened to proposals and community agreement before inflicting big
changes on
Zope Debugger is an enhanced version of pdb for use with Zope.
This release fixes compatability issues with Zope 2.9 and Python 2.4.
It can be used simply by inserting the following lines in any python
code you'd like to debug, including Script (Python)'s and FSPythonScripts:
from Products.zdb
Jim Fulton wrote:
From the old testrunner, which I miss *a lot*, I could ensure I am
indeed running a specific module by doing...
Yup, this is one of the things I like least from the Zope 3 world.
What happened to proposals and community agreement before inflicting
big changes on other
Stephan Richter wrote:
On Tuesday 21 March 2006 02:54, Chris Withers wrote:
I particularly hate the fact that no real effort was put into backwards
compatibility, not to mention those silly weird
sort-of-fifty-dots-per-line thing that doesn't actually work.
I think this is not fair. Jim has
Philipp von Weitershausen wrote:
Tres Seaver wrote:
I'm not sure what Chris meant, but the change to the visual output of
the testrunner when running with dots seems gratuitous to me, as well
-- I don't see any benefit to the indented, narrower output,
Me neither, for what it's worth.
Okay,
Stuart Bishop wrote:
silence it (and open a bug report at the same time). The noisier test output
is, the more likely you are to miss relevant information.
Totally agreed, I was kinda shocked at how many deprecation errors Zope
2.9 ships with :-(
Chris
--
Simplistix - Content Management,
Jens Vagelpohl wrote:
I sent an email about this a couple days ago. Basically, I'm down to
one failing unit test in CMFUid and have discovered that CMFUid is
basically broken in 2.0/trunk. I also sent an email on this issue to
the list, hoping that the developers who wrote CMFUid and lobbied
Tres Seaver wrote:
Customization is hard: without TTW modules we *can't* do customization
of arbitrary view logic.
What's the blocker on this? Same thing that's blocking TTW schemas?
cheers,
Chris
--
Simplistix - Content Management, Zope Python Consulting
-
Jens Vagelpohl wrote:
2006-06-09 20:43:01 WARNING ZODB.DB DB.open() has 13 open connections
with a pool_size of 7
Looks like someone somewhere ain't closing their zodb connection in a
test...
ERROR:foo.bar:eek
None
2006-06-09 20:44:24 ERROR foo.bar eek
None
INFO:foo.bar:blah blah
I'd
Jens Vagelpohl wrote:
I'd love to nail this one, it gets boring seeing it in a project's
nightly test runs every night...
A bit of grepping might find that one. :)
Cool, lemme know when you're done :-P
Chris
--
Simplistix - Content Management, Zope Python Consulting
-
Hi All,
yuppie wrote:
Layers
--
ZCML is set up using test layers. Their setUp() and tearDown() methods
are only run once for all tests in the layer.
Maybe of interest, I've attached the layers file I use when testing Zope
2 apps. It does the right thing w.r.t. having a DemoStorage for
Hi All,
Martin Aspeli wrote:
class IWorkflowEvent(IObjectEvent):
A workflow related event
wf_name = TextLine(title=uThe name of the workflow this event is
part of)
transition = TextLine(title=uThe name of the transition taking place)
state_before = TextLine(title=uThe
Martin Aspeli wrote:
To subscribe only to particular transitions, you would need for each
transition object to provide a specific interface.
Unless you could leverage the same kind of thing that makes named
adapters work...
zope.event?), it registers a general subscriber for IObjectEvent
PData is there for a reason, unravelling it into a string is often not
the best thing to do.
That said, I can't see much context here, but just thought I'd mention it..
Chris
Yvo Schubbe wrote:
Log message for revision 72567:
- added Pdata support
Changed:
U
Miles wrote:
- PAS: looks the most pluggable but doesn't seem to have a MySQL plugin
and is quite complicated at first glance.
- MySQLUserFolder: appears to fit the bill for authentication but no
changes since late 2005.
- ExUserFolder: also looks like it will deal with authentication
Alexander Limi wrote:
This issue goes back to the original discovery that Zope had a bug that
made its Product lookup mechanism
What do you mean by Product lookup mechanism?
cheers,
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
Philipp von Weitershausen wrote:
Charlie Clark wrote:
Do you know of a Zope Product that already wraps report lab, or do you
recommend just accessing directly with a script?
I can't think of anything that would do this for you: transforming
HTML to PDF doesn't usually work very well.
59 matches
Mail list logo