Re: [ZWeb] the wikis is evil discussion

2006-10-11 Thread Simon Michael
Thanks Martijn, all. We made some good progress. For clarity, I heard no 
arguments against me trying the below so right now I have this action and 
will report any results here asap.



(11:01:29) sm: yes, some good progress
(11:01:40) sm: increased clarity  understanding of next steps anyway
(11:02:35) sm: it sounds like I should try mirroring the wikis like you 
suggest, so I hope to start some of that and follow up soon
(11:07:58) sm: mirroring some wikis alongside zopewiki.org, starting with 
zope 3 wiki
(11:08:29) sm: and see how that goes.. if it's a success we could deprecate 
the old wikis
(11:09:08) sm: and then later I imagine they would move to a zope 
foundation zope server


___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


[Zope] Sending XML straight down to a zope

2006-10-11 Thread Peter Bengtsson

I'm trying to send an XML straight into Zope without specifying it as
a parameter and with a Content-Length. It seems that Zope's mapply
function or whatever it's called digests the raw http body and tries
to turn it into parameters?


Here's the code on the Zope server (uploadExpenseXML()):
def uploadExpenseXML(self):
   return str(self.REQUEST.form.keys())


Here's the dummy code that sends the XML into my Zope:

xml_content = open('validxmlfile.xml').read()
http = httplib.HTTP(localhost, 8080)
http.putrequest(POST, /uploadExpenseXML)
http.putheader(User-Agent, Simple)
http.putheader(Host, localhost)
http.putheader(Content-Length, %d % len(xml_content))
http.endheaders()
http.send(xml_content)
reply, message, headers = http.getreply()
print http.getfile().read()


The result I get is:
['?xml version']

If I debug the value of that single REQUEST.form variable, it starts like this:
'1.0 encoding=ISO-8859-1 standalone=yes ?\nXMLExpense Version=1.0

Obviously, one solution would be to ask the XML sending company to not
post it like this but instead post it by parameter which I know will
work.
But, what if I can't change their minds?



PS. When faced with the same problem a long time ago I ended up
writing a mod_python app running one a different port that converted
the http post from mod_python into a parameter based http post. I
don't want to have to do that again.



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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 )


[Zope] Re: Production Advice

2006-10-11 Thread Maik Ihde
 Right now, I'm developing on a WinXP machine, and am considering SuSE
 9.1 for my spec, any experiences, good or bad?... YAST2-installed or
 manually?

Regardless of the Distribution I would say that any Linux which is still
supported (I doubt that about Suse 9.1, though) is a good choice as long as 
you or the Admin in charge knows how to handle it.

I would recommend to at least install Zope from Source. The Python 2.3.5
included in Debian Sarge works well - dunno about Suse 9.1, however I would
suggest to install Python 2.3.5 from Source. It's fairly easy and
straightforward...

Kind Regards
Maik







___
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] Clarification: uncatalog_object question

2006-10-11 Thread Jonathan

Thanks for the response Chris, but it is about 2 years too late!

If you look at the email source you will see my original post was dated from 
2004.  I have been getting several zope mails from 2004, the mailman must be 
pooched!


Thanks for the effort though!

Jonathan


- Original Message - 
From: Chris Withers [EMAIL PROTECTED]

To: Jonathan Hobbs [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Tuesday, October 10, 2006 6:44 AM
Subject: Re: [Zope] Clarification: uncatalog_object question



Jonathan Hobbs wrote:
I used catalog-aware objects and just deleted the object in the folder 
and

the object was automatically removed from the zcatalog).


I don't understand why the uid of 1049298593 works in retrieving the 
record

from the zcatalog, but not when used to delete the record from the
zcatalog?!  (I have looked at the code in Catalog.py and nothing in the
uncatalog_object method provides any hints as to why this problem is
occuring).


Be careful the difference between the internal document id used by the 
catalog and the identifier the object was catalogued with.


The latter is the physical path of the object unless you specify it...

The latter is also what you need to pass to uncatalog an object...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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 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] How can I store session data to db on login/logoff events ?

2006-10-11 Thread Pletli Antal
 
Hi All!

Sorry for my stupid question and my english:

I would like store some session data to db when the users log into my
zope system and when the session object will be deleted.
When the users log into the system the index_html script sets some data
to request.SESSION object.
I have a script called addScript that runs when an object is added to
transient data container.
In the addScript I try receive data with yyy =
container.SESSION.get('xxx') or item.get() but I cannot see the
keys.
How can I retrieve the user SESSION data when the items are created or
deleted from the transient object container?

Thank you in advance 

Antal
___
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 Crashes When Product Breaks

2006-10-11 Thread Jonathan



If you have "debug-mode on" enabled in zope.conf 
try disabling it.


Jonathan


  - Original Message - 
  From: 
  [EMAIL PROTECTED] 
  To: zope@zope.org 
  Sent: Wednesday, October 11, 2006 10:52 
  AM
  Subject: [Zope] Zope Crashes When Product 
  Breaks
  I am new to using Zope. We 
  are running a Win 2003 server with Zope 2.8.8 and have installed the 
  IssueTracker Product. Everything was working fine and now I can't access 
  the Zope manager at all. It seems whenever a product breaks, the manager 
  breaks with it. I had this problem before when I tried to install the 
  cookie crumbler. When I add an instance of this product I could no 
  longer access any part of zope nor its other products. Now this may be a 
  problem with the product itself but I'm having trouble troubleshooting the 
  product problems if the whole zope interface crashes.  
  Does anyone have any ideas on how I can get 
  Zope running again?  Things I've 
  tried: restarting the Zope service from the Services app. I also checked 
  the log to make sure it was running on port 8080. I currently get a page 
  not found error when I go to this address. The last thing I did before this broke was add a couple issues to the 
  issuetracker and added a user and that was the last I was able to access the 
  Zope manager. Thanks ~Natalie
  
  

  ___Zope maillist 
  - 
  Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** 
  No cross posts or HTML encoding! **(Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announcehttp://mail.zope.org/mailman/listinfo/zope-dev 
  )
___
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 Crashes When Product Breaks

2006-10-11 Thread natalie . l . doe

Thanks. I guess I posted to soon. I
changed the port it was listening on and it is working now. It still
is a puzzle why it won't work on that port. I suspect there is some
oracle stuff that might have been trying to share that port but this time
around there was no evidence of that so it was not my first thought.

I'll try turning the debug-mode off though
when I try to reinstall the cookie-crumbler because that breaks the manager
every time.

Thanks,
~Natalie






Jonathan [EMAIL PROTECTED]

11-Oct-2006 10:57
   




To
zope@zope.org, [EMAIL PROTECTED]


cc



Subject
Re: [Zope] Zope Crashes When
Product Breaks








If you have debug-mode on enabled
in zope.conf try disabling it.


Jonathan

- Original Message - 
From: [EMAIL PROTECTED]

To: zope@zope.org

Sent: Wednesday, October 11, 2006 10:52 AM
Subject: [Zope] Zope Crashes When Product Breaks


I am new to using Zope. We are running a Win 2003 server with Zope
2.8.8 and have installed the IssueTracker Product. Everything was
working fine and now I can't access the Zope manager at all. It seems
whenever a product breaks, the manager breaks with it. I had this
problem before when I tried to install the cookie crumbler. When
I add an instance of this product I could no longer access any part of
zope nor its other products. Now this may be a problem with the product
itself but I'm having trouble troubleshooting the product problems if the
whole zope interface crashes.  

Does anyone have any ideas on how I can get Zope running again? 


Things I've tried: restarting the Zope service from the Services app. I
also checked the log to make sure it was running on port 8080. I
currently get a page not found error when I go to this address.


The last thing I did before this broke was add a couple issues to the issuetracker
and added a user and that was the last I was able to access the Zope manager.


Thanks 
~Natalie


___
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 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: Sending XML straight down to a zope

2006-10-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter Bengtsson wrote:
 I'm trying to send an XML straight into Zope without specifying it as
 a parameter and with a Content-Length. It seems that Zope's mapply
 function or whatever it's called digests the raw http body and tries
 to turn it into parameters?
 
 
 Here's the code on the Zope server (uploadExpenseXML()):
 def uploadExpenseXML(self):
return str(self.REQUEST.form.keys())
 
 
 Here's the dummy code that sends the XML into my Zope:
 
 xml_content = open('validxmlfile.xml').read()
 http = httplib.HTTP(localhost, 8080)
 http.putrequest(POST, /uploadExpenseXML)
 http.putheader(User-Agent, Simple)
 http.putheader(Host, localhost)
 http.putheader(Content-Length, %d % len(xml_content))
 http.endheaders()
 http.send(xml_content)
 reply, message, headers = http.getreply()
 print http.getfile().read()
 
 
 The result I get is:
 ['?xml version']
 
 If I debug the value of that single REQUEST.form variable, it starts
 like this:
 '1.0 encoding=ISO-8859-1 standalone=yes ?\nXMLExpense
 Version=1.0
 
 Obviously, one solution would be to ask the XML sending company to not
 post it like this but instead post it by parameter which I know will
 work.
 But, what if I can't change their minds?
 
 
 
 PS. When faced with the same problem a long time ago I ended up
 writing a mod_python app running one a different port that converted
 the http post from mod_python into a parameter based http post. I
 don't want to have to do that again.

Stock Zope can only handle POST request with XML payloads if they
conform to the XMLRPC spec:  they must have the 'Content-type' header of
'text/xml', and the document must be encoded as an xmlrpc request.

If you can get the vendor to use a PUT request instead of a POST, you
could process the result inside a custom object'c 'PUT' method.
Otherwise, you are going to need to create a custom derivative of
ZPublisher.HTTPRequest, and override its 'processInputs' to handle the
vendor's non-standard dump.  You could make that server listen on a
different port, for instance (I'm guessing you can tell them what URL to
POST to, right?)


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFLRMX+gerLs4ltQ4RAuLVAJ9YJUQBTQzWxwEFlC5Wq/3OhUAVqACfUslN
YgO7r1gy0aepLprIi0S8LNo=
=ZHoA
-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 )


[Zope] Zope 2 for Windows

2006-10-11 Thread yary

For the last week or two, only Zope 3 has been available to windows
users for download from http://www.zope.org/Products - can the powers
that be publish the win32 installers for 2.9.5/2.10.0?
___
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 can I store session data to db on login/logoff events ?

2006-10-11 Thread Dieter Maurer
Pletli Antal wrote at 2006-10-11 15:19 +0200:
 ...
How can I retrieve the user SESSION data when the items are created or
deleted from the transient object container?

The Transient Object Container (that's the session container)
has too scripts for this. You configure them in Zope's configuration file.



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


Re: [Zope] Zope Crashes When Product Breaks

2006-10-11 Thread Paul Winkler
On Wed, Oct 11, 2006 at 11:22:42AM -0400, [EMAIL PROTECTED] wrote:
 Thanks.  I guess I posted to soon.  I changed the port it was listening on 
 and it is working now.  It still is a puzzle why it won't work on that 
 port.  

That often means that you have a zope process lingering that still holds
that port.  Try something like: ps -wax | grep py

-- 

Paul Winkler
http://www.slinkp.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 2 for Windows

2006-10-11 Thread michael nt milne
The windows builds will be available as soon as someone volunteer to careabout the Windows platform.ignorant thinking. Most businesses use Windows and Zope will suffer unless it is embraced.
On 10/11/06, Andreas Jung [EMAIL PROTECTED] wrote:
--On 11. Oktober 2006 11:18:42 -0700 yary [EMAIL PROTECTED] wrote: For the last week or two, only Zope 3 has been available to windows users for download from 
http://www.zope.org/Products - can the powers that be publish the win32 installers for 2.9.5/2.10.0?The windows builds will be available as soon as someone volunteer to care
about the Windows platform.-aj___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 )-- michael
___
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 2 for Windows

2006-10-11 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 11 Oct 2006, at 17:14, michael nt milne wrote:



The windows builds will be available as soon as someone volunteer  
to care

about the Windows platform.



ignorant thinking. Most businesses use Windows and Zope will suffer  
unless it is embraced.


Who do you think you are insulting people who actually invest a lot  
of their spare time in the software and in the community? You being  
an annoying troll is helping no one, and it certainly won't get  
Windows builds done.


jens



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFLW7/RAx5nvEhZLIRAvVzAKCRyMg8a1h47Wto8h2ozUnjnGIq4gCfXQtp
7jGlpaWBQ/VOEHbCmSezY5s=
=1kb5
-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 )


[Zope] Help create filesystem skin with product

2006-10-11 Thread yary

I'm having a problem which must have been solved many times before-
trying to make a product that ships with a skin. I'm new to Zope
development, been stumbling for a couple months with it.

Ideally, the end user will unpack my product Q into a Products
directory. They will be able to add a Q object to an existing CMF
site, or create a QSite at their Zope2 root. If they create a QSite,
my product should give it a QSkin during instantiation. I'm developing
the QSkin (and the entire Q product) on the filesystem.

Background:
The product includes a subclass of CMFSite called a QSite. If the user
creates a QSite, I'd like it to include a QSkin which the user can
select from the portal_skins tool.

The product is running on Zope 2.9.4, Five 1.4, CMF 2.0. It needs to
work on Windows and Linux. (Would like to use Zope 2.10, Five 1.5 when
someone compiles the win32 installer, so I don't have to worry about
five:traversable directives! Already posted a request for that.)

Customer requires that the product have no Plone dependencies. Product
will require workflow, so it can have a CMF dependency. Could possibly
implement on Zope 3, though I could not figure out basic workflow
management on that platform, and would rather not re-implement
something available on Zope2.

Hurdles I've had so far in creating a skin:
Using Five- seems to be the way to go. Started by trying
browser:page  browser:defaultView with QSite/IQSite- really
didn't know what I was doing, and a helpful sould pointed out, that is
what skins are for.

Tried using zcml skin directive, broswer:layer, and browser:defaultSkin.

I can create a skin in zcml, and adding /++skin++QSkin to the end of
any URL causes the page to load. However it does not look like a
QSkin- apparently acquisition finds items in portal_skins before it
finds resources added by five. So if I use zcml to add a Logo.gif, it
won't override a Logo.gif already on the CMF site, to see it I have to
also add /++resource++Logo.gif

I cannot use defaultSkin with CMF, because CMF already declares a
defaultSkin. Its better if the user picks the skin from the
portal_skins management interface, but skins and layers declared in
zcml don't show up there.

As for the old/tried-and-true way, can't use the
ExampleFileSystemSkin or MinimalPloneSkin as a starting point, perhaps
they use parts of Plone: cannot import name ContentFactoryMetadata.
http://plonebook.packtpub.com/chapter6_preview.htm looks promising.


Hurdles I've had so far installing the skin:
Tried using container events (subscriber zcml) to call a hook when a
QSite is created, presuming that I'd work skin magic on the new site
object from within the event handler. Alas that is not the intended
purpose of subscriber and while it may work in the future, events
don't fire on CMFSite objects yet.

Am I supposed to create a manage_afterAdd method in my QSite object,
even though it's depreciated? Hmm, just tried creating that as a
method of QSite and it doesn't get called either- what's the right
way?

Thanks for reading my rambling.
___
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] Help create filesystem skin with product

2006-10-11 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 11 Oct 2006, at 18:37, yary wrote:


I'm having a problem which must have been solved many times before-
trying to make a product that ships with a skin. I'm new to Zope
development, been stumbling for a couple months with it.


Take a look at CMFCalendar as included in the CMF 2.0 you're working  
with. It registers a skin folder and even adds it to the skins path  
automatically, using a GenericSetup profile. That's a good example to  
look at.


jens



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFLXc5RAx5nvEhZLIRAmRuAJ9yn69WUwiAJLKmi/2jVDJ7YoTI3wCfbGtP
XMdrIbhMWwLOuciLBJACtUU=
=t4JR
-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 )