Re: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Martijn Pieters
On Jan 24, 2008 12:18 PM, Roger Ineichen <[EMAIL PROTECTED]> wrote:
> > Apparently that's fixed in Python 2.5, which is a fat lot of
> > help to us stuck on 2.4.
>
> Sounds like a good reason to switch to Pyhton 2.5

No it doesn't; sounds like a good reason to backport the fix to Python 2.4..

I think this is the bug in question:

  http://bugs.python.org/issue1471427

with the patches for the problem in:

  http://bugs.python.org/issue1484695

-- 
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Martijn Pieters
On Jan 24, 2008 10:02 AM, Roger Ineichen <[EMAIL PROTECTED]> wrote:
> I think that's a setuptools issue, The files do not get
> extracted, that's it. I have no idea if this only happens
> because the computer which extracts the eggs does not have
> the newest setuptools installed.
>
> I used the newest version of setuptools whihc is available
> e.g. version: setuptools-0.6c7-py2.4.egg. If this is a
> issue on build eggs, then it's defently not fixed.

Ah, ah, ah! Files not getting extracted sounds like the tarfile bug in
python that Florian Schulze hit as well:

  http://www.nabble.com/Egg-uploads---Lessons-learned-td14279963s6745.html

Apparently that's fixed in Python 2.5, which is a fat lot of help to
us stuck on 2.4.

-- 
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c-form meta.zcml error

2008-01-23 Thread Martijn Pieters
On Jan 23, 2008 6:11 PM, Philipp von Weitershausen
<[EMAIL PROTECTED]> wrote:
> Yes, MANIFEST.in is a distutils feature. It's also described in my
> book, by the way.
>
> However, setuptools makes the usage of MANIFEST.in unnecessary when
> you're operating within a subversion checkout. In such a case, an egg
> will contain all files managed by subversion. Therefore, you should
> always create eggs from svn checkouts, never from svn exports.
> setuptools is smart enough to ignore '.svn' etc. The releasing-
> software.txt document outslines the correct procedure here, I think.

Right, and I think that's actually a bad feature; it has caused quite
some confusion for several developers, including myself. It means that
setup.py silently works completely different when within or outside of
a subversion working directory.

-- 
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c-form meta.zcml error

2008-01-23 Thread Martijn Pieters
On Jan 23, 2008 2:04 PM, Roger Ineichen <[EMAIL PROTECTED]> wrote:
> > No, I see the exact same thing on Mac and Linux; you need to
> > explicitly include .zcml and .txt files in MANIFEST.in; that
> > file doesn't exist; just create one next to setup.py, and
> > include 2 lines:
> >
> >   global-include *.txt
> >   global-include *.zcml
> >
> > This'll include *all* text and zcml files recursively found
> > from that directory.
>
> Are you really sure? that's new to me and that isn't documented
> here:
> http://svn.zope.org/*checkout*/Sandbox/philikon/foundation/releasing-softwar
> e.txt

Nope, it's a distutils feature: http://docs.python.org/dist/manifest.html

> Is this new or just a windows feature?
>
> And why does the eggs work on my windows machine without any issue?

Did you release the egg from a SVN checkout, or a SVN export? I
haven't experimented with this, but that's my current hypothesis, that
setuptools behaves differently then; that or a dev egg has been
created in a buildout and the .egg-info dir contains more information.

> Note I just released like we did before, older tags do not contain
> such a MANIFEST.in file.

It's how I solved the same problem recently with the release of
collective.captcha; the upload to pypi didn't have anything but the
README.txt and the python code; other text files and zcml were
missing.

> Note my output looks like this and contains all *.zcml files etc.
> Also the zip or if I use --format=tar.gz contain the files.
> I guess they only get not extracted from the zip or tar.gz file.
>
> On my machine everyting is there and the eggs works like expected
> if the come form pypi ;-)

Perhaps there is something different going on then; as I stated, I saw
what appears to be the same problem and it was solved by including a
MANIFEST.in.

-- 
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c-form meta.zcml error

2008-01-23 Thread Martijn Pieters
On Jan 23, 2008 1:20 PM, Roger Ineichen <[EMAIL PROTECTED]> wrote:
> Sorry about that... PhiliKON told me
> that this is fixed a couple month ago. That was the
> reason I tried to lay eggs again. But now it seems
> that we have rumbled eggs again.
>
> Seems that setuptools(?) is buggy and still doesn't work
> on a windows box. Philipp, right? Or do I need a patch?

No, I see the exact same thing on Mac and Linux; you need to
explicitly include .zcml and .txt files in MANIFEST.in; that file
doesn't exist; just create one next to setup.py, and include 2 lines:

  global-include *.txt
  global-include *.zcml

This'll include *all* text and zcml files recursively found from that directory.

-- 
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c-form meta.zcml error

2008-01-23 Thread Martijn Pieters
On Jan 23, 2008 10:12 AM, Peter Koppatz <[EMAIL PROTECTED]> wrote:
> What has changed between 1.7.0 and 1.7.2?
>
> ls -al | wc -l
>
> 1.7.0 --> 76
> 1.7. 2 --> 47
> there are no *-txt , *.zcml anymore!

Someone must have built the release tarball from a fresh SVN export;
setup.py does not include txt and zcml files and such by default when
building a release tarball, while a development egg would include
those. In other words, the maintainer of z3c.form (and I mean YOU,
Stephan) should add a MANIFEST.in with the lines "global-include
*.txt" and "global-include *.zcml" in it and re-roll the release.

-- 
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Vocabulary, unicode

2008-01-07 Thread Martijn Pieters
On Jan 7, 2008 5:35 PM, Katja Süss <[EMAIL PROTECTED]> wrote:
> SimpleTerm of zope.schema does not allow tokens to be unicode. Why this?

Because tokens need to be round-trippable in browsers, without
encountering encoding issues. Tokens are internal values, unique in
the set, whatever they may represent.

-- 
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3 freelance inquiry

2007-09-14 Thread Martijn Pieters
On 9/14/07, Stephan Richter <[EMAIL PROTECTED]> wrote:
> I have some availability. My rate is $150/hour. I guess I don't have to
> introduce myself? ;-)

Open Source
Open Community
Open Rates

;-)

-- 
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3 PID file ?

2007-07-17 Thread Martijn Pieters

On 7/17/07, Thierry Florac <[EMAIL PROTECTED]> wrote:

> What about "zopectl logreopen"?
>

"zopectl logreopen" works, but it seems that a SIGUSR2 signal is sent
and that the whole Zope process is respawned.
So I don't see any difference with "zopectl restart"... :-(

Am I wrong ?


You are. There is a SIGUSR2 handler in Signals.Signals, which calls
the 'reopen' method on all active loggers..

Nowhere is there a signal handler that restarts Zope on SIGUSR2.
SIGHUP will cause a restart, SIGINT a shutdown, and SIGTERM a fast
shutdown.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Martijn Pieters

On 6/5/07, Doyon, Jean-Francois <[EMAIL PROTECTED]> wrote:

You may want to look into PyLint:

http://www.logilab.org/857

Or PyChecker:

http://pychecker.sourceforge.net/


Or use PyFlakes:

 http://www.divmod.org/projects/pyflakes

which doesn't execute code (like PyChecker does).

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope3-dev] Re: z3c.form 1.0.0 released!

2007-05-25 Thread Martijn Pieters

On 5/25/07, Raphael Ritz <[EMAIL PROTECTED]> wrote:

Just a quick question in passing, as I understand this as Zope
growing "yet another(?)" AJAX framework.
Did you consciously decide against KSS (http://kssproject.org)
or do you see this as complementary?


We consciously decided against KSS, for various reasons. Some of these
reasons lie in a difference of opinion on how an AJAX architecture
should work.

This is Paul Carduners GSOC project, BTW.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Utility Local to an Annotation?

2007-04-27 Thread Martijn Pieters

On 4/27/07, Martin Aspeli <[EMAIL PROTECTED]> wrote:

I think the cleanest design would be:

 - You have a generic object UUID facility
 - You make a UUID for a feed when you create it, and store it in the feed
annotation
 - You generate feed item UUIDs on the fly from a hash/concatenation of the
feed UUID and the generic object UUID


if you are generating UUID's based on the feed-specific UUID and a
unique identifier for the object, you could just use the already
present intid..

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Any Word On When Zope 3 Will Support Python 2.5

2007-03-26 Thread Martijn Pieters

On 3/26/07, Mark, Jonathan (Integic) <[EMAIL PROTECTED]> wrote:

I prefer to do all of my Python development in Python 2.5. Is there any word on 
when Zope 3 will support the current version of Python?


There is a Google Summer of Code proposal on the table to make Z3 work
with python 2.5; it only covers making things compile and generally
work. No security support for 2.5 is in the works at the moment, as
far as I know.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] mport Products.Archetypes

2007-03-19 Thread Martijn Pieters

On 3/19/07, Ariel Eduardo Morales Malpica <[EMAIL PROTECTED]> wrote:

I'am trying to import Products.Archetypes.atapi module but I can't. I
mean, I can import that module but when I press F9 (I use Eclipse IDE)
with that only sentence (from Archetypes.atapi import *), I don't
include Products because isn't a package and I add the path to
PYTHONPATH. I get an error like this:

"from Products.Archetypes.debug import log, log_exc
ImportError: No module named Archetypes.debug"

I don't know what to do and I need fix it as fast as you can.


Eclipse doesn't know anything about the Zope magic used for stitching
multiple Product directories together; it is not a normal Python
package. Eclipse will need to add specific support for that, like Wing
IDE has done.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Disable raw directive in restructured text

2007-03-16 Thread Martijn Pieters

On 3/16/07, Florian Lindner <[EMAIL PROTECTED]> wrote:

But these settings still don't entirely satisfy me because if somebody
enters .. raw:: html a warning message is printed informing that raw is
disabled. If I set:

settings_override["report_level"] = "quiet"

The raw directive is is completely removed from output. What I want is that it
is treated just like any other text, appearing also in the output.

Is that possible?


You'll have to ask the docutils developers that, or preferably their
mailinglist, if it exists.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Disable raw directive in restructured text

2007-03-16 Thread Martijn Pieters

On 3/15/07, Florian Lindner <[EMAIL PROTECTED]> wrote:

I've found out it could partly be achieved by using:

def convertToHTML(self, comment):
""" Converts a comment from restructured text to HTML. """
text = unicode(comment.content)
settings_override = {}
settings_override["raw_enabled"] = False
settings_override["file_insertion_enabled"] = False
# settings_override["report_level"] = "quiet"
renderer = ReStructuredTextToHTMLRenderer(text, self.request)
return renderer.render(settings_override).strip()

but now a raw directive generates an error message whereas it is completely
swallowed when uncommenting the report_level.


Note that you should really read the following:

 http://docutils.sourceforge.net/docs/howto/security.html

You'll have to disable the include and csv-table directives as well.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: UnicodeEncodeErrors from zope/app/maildir.py

2006-11-29 Thread Martijn Pieters

On 11/29/06, Raphael Ritz <[EMAIL PROTECTED]> wrote:

The mail's body or pay load on the other hand can have
any encoding.


Nonsense. From RFC 2822, section 2.1:

  At the most basic level, a message is a series of characters.  A
  message that is conformant with this standard is comprised of
  characters with values in the range 1 through 127 and interpreted as
  US-ASCII characters [ASCII].  For brevity, this document sometimes
  refers to this range of characters as simply "US-ASCII characters".

  Note: This standard specifies that messages are made up of characters
  in the US-ASCII range of 1 through 127.  There are other documents,
  specifically the MIME document series [RFC2045, RFC2046, RFC2047,
  RFC2048, RFC2049], that extend this standard to allow for values
  outside of that range.  Discussion of those mechanisms is not within
  the scope of this standard.

In other words, the MIME RFCs tell you how to encode your message in
such a way that the message body, the characters that go across the
wire, fall within the ASCII range. MIME uses a transfer encoding like
quoted-printable to ensure this.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: UnicodeEncodeErrors from zope/app/maildir.py

2006-11-29 Thread Martijn Pieters

On 11/29/06, Rupert Redington <[EMAIL PROTECTED]> wrote:

Those are great pointers, thanks, but I still can't understand why
zope.app.mail's MailDir functions want to encode the message using the
'ascii' encoding, nor does there seem to be any way to suggest a
different encoding to the mail system.


Perhaps because emails can only be transferred as ASCII? You need to
encode the body of the email (and any headers) down to ASCII, see RFC
822 and friends. This is what mime encodings take care of, see the
'email' package in the python standard library.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Conflicting configuration actions for protectName __setitem__

2006-09-20 Thread Martijn Pieters

On 9/20/06, Rob Campbell <[EMAIL PROTECTED]> wrote:

In zcml I have require subdirectives for FosterRecord.  They set
permissions for
zope.app.container.interfaces.IReadContainer/IWriteContainer and
IFosterRecord, along with set_schema for IFosterRecord.

I started getting the errors when I added IReadContainer and
IWriteContainer.


Beth IFosterRecord and IWriteContainer contain __setitem__. You are
trying to set permissions for __setitem__ twice that way.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Security in Zope 3

2006-09-19 Thread Martijn Pieters

On 9/19/06, Chris Withers <[EMAIL PROTECTED]> wrote:

...because z has two containment paths:

x.z
x.y.z

...which might have different security constraints.

How does Zope 3 handle the same kind of setup?


In Zope2 containment is looked up through acquisition, that is,
implicitly. In Zope3 it is explicit, through the ILocation interface.
That interface specifies the __parent__ attribute, which normaly
specifies only one parent, as the current implementations of that
interface in Zope3 persist this or use a wrapper.

I a currently running application I store references to objects in
multiple places without problems just fine. Just be careful to clean
up when the object gets deleted from it's canonical location (the
__parent__ object).

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problem with containers

2006-09-15 Thread Martijn Pieters

On 9/15/06, Rob Campbell <[EMAIL PROTECTED]> wrote:

I just recently started trying out Zope 3.  My first test project is a
few containers that can contain other containers or an object.  They are
laid out as follows:

FosterRecord
-> FosterSource
 -> Foster
 -> FosterGroup
-> Foster

A FosterRecord is the top level container and can contain a
FosterSource.  A FosterSource can contain a Foster object or a
FosterGroup.  And a FosterGroup can contain a Foster object.


You cannot combine multiple contained or container constraints; you'll
have to define a contained contstraint for the Foster implementation
that includes both IFosterSource and IFosterGroup.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Multiple actions per button in formlib forms?

2006-09-15 Thread Martijn Pieters

On 9/15/06, Bjorn Tillenius <[EMAIL PROTECTED]> wrote:

This is not true. The decorator also returns the action, meaning that
self.handle_edit_action will be an Action, not a method.


You are absolutely right, and *bingo*.  Martin Aspelli was right all
along, and I haven't been paying attention.

Stephan, the following will work:

 @formlib.form.action(u'Apply&Close')
 def handle_applyAndClose(self, action, data):
 """apply form changes and close form."""
 # handle_edit_action is an Action. Call it's success method.
 self.handle_edit_action.success(data)
 self.request.response.redirect(getAbsoluteURL(
     self.context.__parent__,self.request))

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Multiple actions per button in formlib forms?

2006-09-14 Thread Martijn Pieters

On 9/14/06, Martin Aspeli <[EMAIL PROTECTED]> wrote:

Stefan Fink wrote:
> Error object: 'Action' object is not callable

I wonder if this has to do with the @form.action... decorator on
handle_edit_acion? Try to take it off and/or replicate the code of the
edit action itself.


No, all the decorator does is add an Action object to the class
attribute 'actions' (which it creates if it doesn't yet exist).

Without a proper traceback we're just guessing here. Somewhere
something is trying to treat a Action instance as a callable.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Multiple actions per button in formlib forms?

2006-09-14 Thread Martijn Pieters

On 9/14/06, Stefan Fink <[EMAIL PROTECTED]> wrote:

That's what I'm trying to do. The problem is, that when calling
self.handle_edit_action(action, data), which is part of formlib, the
following error is raised:

Error object: 'Action' object is not callable


First of all, you need to provide complete tracebacks. Such an error
is next to useless.


Sorry, forgot to mention that before. Any ideas how to get things work?


No idea what you pass into that method as 'data'. The action attr is
ignored by that method.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Multiple actions per button in formlib forms?

2006-09-14 Thread Martijn Pieters

On 9/14/06, Stefan Fink <[EMAIL PROTECTED]> wrote:

how is it possible to add multiple actions per button to formlib forms?
Actually I'm trying to create a button which:
 - applies all changes made in the form
 - takes the user back to the container view


Just call the second action method from the first? formlib actions
call one method, but nothing stops you from calling another method
form the first. It's what I do all the time.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: NTLM credential plugin

2006-09-12 Thread Martijn Pieters

On 9/13/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote:

That's an authenticator plug-in to talk to the Windows directory
service, so that users can log into Zope using their Windows logins.


Which tells you how much *I* looked at it. ;) The original thread
announcing zc.winauth mentioned NTLM somewhere (as in 'Firefox does
NTLM too'), hence my misunderstanding. Mea Culpa!

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] NTLM credential plugin

2006-09-12 Thread Martijn Pieters

On 9/13/06, Simon Hang <[EMAIL PROTECTED]> wrote:

I'm thinging to write a NTLM credential plugin for zope3. But as I know,
ntlm use 4-way handshake procedure, that means it needs two round-trips
between server(zope3) and client(browser).


Have you looked at Zope Corp's zc.winauth package?

http://svn.zope.org/zc.winauth/trunk/src/zc/winauth/

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: How to make a new namespace for pagetemplates?

2006-09-08 Thread Martijn Pieters

On 9/8/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote:

* Solution outside of Zope.

Martijn suggested a JavaScript. If you need it to work for
non-JavaScript browsers, I suggest a WSGI middleware that checks for
text/html data and transforms  elements as needed. You could do the
transformation in XSLT or Python (e.g. via elementtree).


Or do as zc.resourcelibrary does; implement a subclass of
BrowserResponse that does the transformation for you. Then override
the default request (so it'll use your response). See
http://svn.zope.org/zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py?rev=69889&view=auto
and 
http://svn.zope.org/zc.resourcelibrary/trunk/src/zc/resourcelibrary/configure.zcml?rev=68929&view=auto

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to make a new namespace for pagetemplates?

2006-09-08 Thread Martijn Pieters

On 9/8/06, FB <[EMAIL PROTECTED]> wrote:

my employer want to have all external links marked with a small icon telling
anonymous users from the internet that everything behind given links is
beyond our responsibility.


Why not use a piece of javascript to do this? See the linkpopper
product on plone.org for a way to process all links in a page and
process them. That product makes external links open in a new window,
but the code should be easy to alter.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] z3wingdbg 0.2.0: Wing IDE debugger integration for Zope3

2006-09-01 Thread Martijn Pieters
I'm pleased to announce the second alpha release of z3wingdbg, a Zope3
package integrating debug support for the Wing IDE into Zope3.

z3wingdbg sets you up with a seperate single-threaded HTTP server
through which all requests are under the control of the Wing Debugger.

This second release provides the almost the same functionality as it's
Zope2 equivalent, including accepting connections (have the IDE
initialize the connection) has not been implemented. Future releases
will include a more user-friendly interface to configuring the package
and other server types, such as FTP and SSH.

Project homepage (including downloads)
http://www.zopatista.com/projects/z3wingdbg

Development
http://trac.zopatista.com/zopatista/z3wingdbg

Subversion Repository
https://svn.zopatista.com/zopatista/z3wingdbg
http://trac.zopatista.com/zopatista/browser/z3wingdbg

Reporting bugs, feature requests
http://trac.zopatista.com/zopatista/

Martijn Pieters




signature.asc
Description: OpenPGP digital signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Virtual hosting problem

2006-08-30 Thread Martijn Pieters

On 8/30/06, Lorenzo Gil Sanchez <[EMAIL PROTECTED]> wrote:

I guess I need to slightly change Zope publishing mechanism and I saw
IVirtualHostRoot in zope.publisher.interfaces.http. Probably calling
setVirtualHostRoot when the traversal is at 'site_folder' is what I need
but I have no clue about where should I do that.


You could register an event listener for
zope.app.publication.interfaces.IBeforeTraverseEvent, and manipulate
the request if event.object implements
zope.app.folder.interfaces.IRootFolder. You'll need a hack to find the
request though; you can get it from the security interaction:

from zope.publisher.interfaces.http import IHTTPRequest
from zope.security.management import getInteraction

def _getHTTPRequest():
   """Attempt to get the current request, if it exists"""
   interaction = getInteraction()
   if not interaction.participations:
   return
   for participant in interaction.participations:
   if IHTTPRequest.providedBy(participant):
   return participant

That way you can detect the start of a request (before traverse event
on the root folder), grab the request, and manipulate it to suit your
virtual host needs.

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] What kind of Zope3 classes are available?

2006-08-18 Thread Martijn Pieters

On 8/17/06, Tom Dossis <[EMAIL PROTECTED]> wrote:

There's also 'Web Component Development with Zope3" -
http://worldcookery.com/About .  It offers a different slant to the
Developers Handbook.  Some parts of it are now out of date wrt Zope 3.3.


A second edition is in the works, see http://worldcookery.com/News/Grapevine

--
Martijn Pieters
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] z3wingdbg 0.1.0: Wing IDE debugger integration for Zope3

2006-08-13 Thread Martijn Pieters
I'm pleased to announce the first alpha release of z3wingdbg, a Zope3
package integrating debug support for the Wing IDE into Zope3.

z3wingdbg sets you up with a seperate single-threaded HTTP server
through which all requests are under the control of the Wing Debugger.

This initial release provides the almost the same functionality as it's
Zope2 equivalent. Only accepting connections (have the IDE initialize
the connection) has not been implemented. Future releases will include a
more user-friendly interface to configuring the package and other server
types, such as FTP and SSH.

Project homepage (including downloads)
http://www.zopatista.com/projects/z3wingdbg

Development
http://trac.zopatista.com/zopatista/z3wingdbg

Subversion Repository
https://svn.zopatista.com/zopatista/z3wingdbg
http://trac.zopatista.com/zopatista/browser/z3wingdbg

Reporting bugs, feature requests
http://trac.zopatista.com/zopatista/

Martijn Pieters



signature.asc
Description: OpenPGP digital signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users