[Zope-Annce] CMF 1.5.7-beta released

2006-08-17 Thread Jens Vagelpohl

The CMF developer community is pleased to announce the release of
version 1.5.7-beta of the Zope Content Management Framework (CMF).
This release is intended for testing purposes only;  we
do not recommend deploying it to production servers.  The final release
of version 1.5.6 is expected on Sunday, February 26 2006.

What is the CMF?

  The Zope Content Management Framework provides a set of services and
  content objects useful for building highly dynamic, content-oriented
  portal sites.  As packaged, the CMF generates a site much like the
  zope.org site.  The CMF is intended to be easily customizable, in  
terms

  of both the types of content used and the policies and services it
  provides.

What's new in this release?

  The 1.5.7-beta release represents a pure bug fix/maintenance release
  without feature additions.

Where do I get it?

  Download it from http://www.zope.org/Products/CMF/CMF-1.5.7-beta

  Points of interest include:

  - Windows ZIP file:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/CMF-1.5.7-beta.zip

  - Unix tar/gzip archive:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/CMF-1.5.7- 
beta.tar.gz


  - Release notes:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/README.txt

  - Change history:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/CHANGES.txt

  - Installation instructions:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/INSTALL.txt

  - CMF Release Roadmap:
http://www.zope.org/Products/CMF/docs/roadmap

Where do I go to learn more?

  The CMF mailing list ([EMAIL PROTECTED]) has many participants who  
are

  active in supporting the CMF.

...to report bugs?

  The CMF Collector at http://www.zope.org/Collectors/CMF is the  
place to

  report bugs (please search for existing reports of your issue first!)


-
Jens Vagelpohl
[EMAIL PROTECTED]

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

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: POUND/VHM AND ZOPE HELL!!! was: Re: Can't Find This Bug!

2006-08-17 Thread Anton Stonor

beno - wrote:

Therefore, it would appear that the requests coming from these clients 
aren't reaching Zope. DO YOU AGREE WITH THAT CONCLUSION?


However, if they *aren't* reaching Zope, why do they receive a screen 
message like this: Zope \n Welcome to Web.vi where web.vi is my 
personal site?


That seems to be a page you have set up in the root of your Zope 
instance. You get if you access the server by IP:


http://202.71.106.119
http://202.71.106.119:8080/

And it is served out of Zope. Here is the HTTP response:

---
HTTP/1.x 200 OK
Server: Zope/(Zope 2.7.8-final, python 2.3.5, freebsd5) ZServer/1.1
Date: Thu, 17 Aug 2006 06:29:33 GMT
Content-Length: 164
Content-Type: text/html
---

Any chance your unlucky clients are using another domain or subdomain to 
reach the site? A domain/subdomain that are not picked up by VHM which 
could be why Zope is serving from its root?


/Anton

___
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] Logging client IPs to Z2.log

2006-08-17 Thread Philip Kilner
Hi Oliver,

Oliver Hookins wrote:
 I'd missed that you were using the reverse proxy technique - I'd
 strongly recommend rewrite rules.
 
 Without meaning to be greedy, can you suggest an example?
 

As Jonathan says, the Zope book has examples. The most recent version
I'm aware of is at: -

http://www.plope.com/Books/2_7Edition/VirtualHosting.stx

The Rewrite Rules Witch is a handy resource, too: -

http://www.betabug.ch/zope/witch/

HTH!


-- 

Regards,

PhilK

Human language continually changes, innit.
- Stephen Juan
___
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: Logging client IPs to Z2.log

2006-08-17 Thread Josef Meile
Hi Oliver

 You can also look inside the logs of your Apache for the IP addresses?!
 
 That's not always possible in our virtual hosting environment, and besides
it
 makes no sense to have to look in two different places for the same
information.

I would also look for that information in the apache logs as Andreas 
suggested. The problem if you patch the zope code to show the ip addresses
in the zope log, and your zope webserver is under a firewall, then you won't
know if your firewall is working or not. However, if you don't care about
this, then you can try this patch:

Title:  Logging of client IP rather than the IP of the Proxy  
http://www.zope.org/Collectors/Zope/1732

Regards
Josef

___
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: Announcing the release of Zope version 2.8.8

2006-08-17 Thread Chris Withers

Sidnei da Silva wrote:

I am going to give a try to the Visual C Express 2005 one of these
days. Heard reports of people that managed to build extensions for
Python 2.4 with it.


Be careful - I've heard rumours that the Express editions use a 
non-optimising compiler, which would be bad for the official Windows 
distros...


cheers,

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 )


Re: [Zope] Re: Announcing the release of Zope version 2.8.8

2006-08-17 Thread Lennart Regebro

On 8/17/06, Chris Withers [EMAIL PROTECTED] wrote:

Sidnei da Silva wrote:
 I am going to give a try to the Visual C Express 2005 one of these
 days. Heard reports of people that managed to build extensions for
 Python 2.4 with it.

Be careful - I've heard rumours that the Express editions use a
non-optimising compiler, which would be bad for the official Windows
distros...


But good for people developing Zope that has windows machines. I
wouldn't have to sit unconfortably with my portable unix in the sofa,
for example. ;)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] ldap setup

2006-08-17 Thread Siddharth Sethi




Hi, 

I have managed to 
get my LDAPUserFolder configured, connected and all setup. I have no 
problems searching for users from within the ZMI. But the problem that i get is 
that when i start up my plone site, it prompts me for my zope username/password. 
I currently only have 1 user in zope and that is the admin account and the only 
other username/password that works in this prompt is the Manager DN one that i 
setup for my LDAPUserFolder. Can any one help me 
out?
___
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] ldap setup

2006-08-17 Thread Andreas Jung



--On 17. August 2006 09:05:21 -0400 Siddharth Sethi 
[EMAIL PROTECTED] wrote:



Hi,
I have managed to get my LDAPUserFolder configured, connected  and all
setup. I have no problems searching for users from within the ZMI. But
the problem that i get is that when i start up my plone site, it prompts
me for my zope username/password. I currently only have 1 user in zope
and that is the admin account and the only other username/password that
works in this prompt is the Manager DN one that i setup for my
LDAPUserFolder. Can any one help me out?




Please ask on the plone-users list for Plone related issues especially 
because the authentication mechanism depends on the Plone version.


-aj

pgppoAcIw5SB7.pgp
Description: 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] Some users can't view sent PDFs anymore

2006-08-17 Thread Kirk Strauser
Since upgrading from Zope 2.8.something to 2.9.3, many of our customers
can no longer view PDFs that we send them.  If they're using Internet
Explorer, they often get a blank page when trying to view them (and we
haven't been able to nail down the exact combination of Windows + IE +
Acrobat that causes the problem).

Here's the Python script we use to send the files:

## Script (Python) download
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=filename,password=None,skipctypeheader=None
##title=
##
request = container.REQUEST
RESPONSE =  request.RESPONSE

stockexception = 'FileUnavailableError'

# Does the file exist?
if not filename in context.files.objectIds():
raise stockexception

file = context.files[filename]

# Does the given password match the one on the file?
if file.getProperty('password', d=None) != password:
raise stockexception

if not skipctypeheader:
# Set the content type if one is defined for the file
ctype = file.getProperty('content_type', d=None)
if ctype:
RESPONSE.setHeader('Content-Type', ctype)

RESPONSE.setHeader('Content-Disposition', 'inline; filename=%s' % filename)

return context.files[filename]

Here's the output of running 'curl' to fetch one:

$ curl -vv 
'http://web2.xrsnet.com/publicstore/download?filename=print.pdfpassword=foo'  
/dev/null
* About to connect() to web2.xrsnet.com port 80
*   Trying 10.45.14.64... connected
* Connected to web2.xrsnet.com (10.45.14.64) port 80
 GET /publicstore/download?filename=print.pdfpassword=foo HTTP/1.1
 User-Agent: curl/7.15.1 (i486-pc-linux-gnu) libcurl/7.15.1 OpenSSL/0.9.8a 
zlib/1.2.3 libidn/0.5.18
 Host: web2.xrsnet.com
 Accept: */*

 HTTP/1.1 200 OK
 Date: Thu, 17 Aug 2006 14:34:12 GMT
 Server: Zope/(Zope 2.9.3-, python 2.4.3, freebsd6) ZServer/1.1
 Content-Length: 1742
 Content-Type: application/pdf; charset=iso-8859-15
 Content-Disposition: inline; filename=print.pdf
 Vary: User-Agent
  % Total% Received % Xferd  Average Speed   TimeTime Time  
Current
 Dload  Upload   Total   SpentLeft  
Speed
100  1742  100  17420 0  20835  0 --:--:-- --:--:-- --:--:--  
541k* Connection #0 to host web2.xrsnet.com left intact

* Closing connection #0

I feel kind of sheepish about blaming Zope, but everything worked perfectly
one day, I did the upgrade that night, and the complaints started rolling
in the next morning.

If nothing else, would some IE users be kind enough to try to view this
tiny PDF and see whether it opens inline or externally, and whether it
displays actual content (the phrase This is a test.) or a blank page:

http://web2.xrsnet.com/publicstore/download?filename=print.pdfpassword=foo

Many thanks in advance.  My boss is increasingly unamused and I'm out of
ideas.
-- 
Kirk Strauser
The Day Companies
___
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] Content-Disposition is driving me batty

2006-08-17 Thread Kirk Strauser
I have a Python script that transmits a file to the user.  An excerpt:

if not skipctypeheader:
# Set the content type if one is defined for the file
ctype = file.getProperty('content_type', d=None)
if ctype:
RESPONSE.setHeader('Content-Type', ctype)

RESPONSE.setHeader('Content-Disposition', 'inline; filename=%s' % filename)

We most commonly use this to send PDF reports.  After a recent upgrade
from Zope 2.8.something to 2.9.3 (on FreeBSD via ports), IE users can
only sometimes get the file - they otherwise get a blank page. 

Running 'curl' gives the header values I'd expect:

$ curl -vv -O 
'http://web2.xrsnet.com/publicstore/download?filename=print.pdfpassword=foo'  
/dev/null
* About to connect() to web2.xrsnet.com port 80
*   Trying 10.45.14.64... connected
* Connected to web2.xrsnet.com (10.45.14.64) port 80
 GET /publicstore/download?filename=print.pdfpassword=foo HTTP/1.1
 User-Agent: curl/7.15.1 (i486-pc-linux-gnu) libcurl/7.15.1 OpenSSL/0.9.8a 
 zlib/1.2.3 libidn/0.5.18
 Host: web2.xrsnet.com
 Accept: */*

 HTTP/1.1 200 OK
 Date: Wed, 16 Aug 2006 22:26:11 GMT
 Server: Zope/(Zope 2.9.3-, python 2.4.3, freebsd6) ZServer/1.1
 Content-Length: 1742
 Content-Type: application/pdf; charset=iso-8859-15
 Content-Disposition: inline; filename=print.pdf
 Vary: User-Agent
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100  1742  100  17420 0  30301  0 --:--:-- --:--:-- --:--:-- 0* 
Connection #0 to host web2.xrsnet.com left intact

* Closing connection #0


Would some IE users please let me know whether they can view this PDF
normally?

http://web2.xrsnet.com/publicstore/download?filename=print.pdfpassword=foo

Any speculation about what might be causing this is extremely welcome.  I'm
*not* looking forward to rolling back to 2.8.x (and Python 2.3) at this
point.
-- 
Kirk Strauser
The Day Companies

___
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] Content-Disposition is driving me batty

2006-08-17 Thread Andreas Jung



--On 16. August 2006 17:28:00 -0500 Kirk Strauser [EMAIL PROTECTED] wrote:


I have a Python script that transmits a file to the user.  An excerpt:

if not skipctypeheader:
# Set the content type if one is defined for the file
ctype = file.getProperty('content_type', d=None)
if ctype:
RESPONSE.setHeader('Content-Type', ctype)

RESPONSE.setHeader('Content-Disposition', 'inline; filename=%s' %
filename)


I remember having had similar problems with IE and downloading files. In 
general we use only content-disposition: attachment for IE vs. 
content-disposition: inline for all other browsers. After that change we 
haven't had

any bug reports from IE users.

-aj

pgpfUJO6oNDzC.pgp
Description: 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 )


Re: [Zope] Content-Disposition is driving me batty

2006-08-17 Thread Brian Sullivan


Would some IE users please let me know whether they can view this PDF
normally?

   http://web2.xrsnet.com/publicstore/download?filename=print.pdfpassword=foo

Any speculation about what might be causing this is extremely welcome.  I'm
*not* looking forward to rolling back to 2.8.x (and Python 2.3) at this
point.


I am running IE7 beta 3 -- on my machine the pdf file seems to load --
so no content disposition problem but there are messages about missing
fonts from the PDF reader *7.0.8 btw) -- no real information is
displayed so I am guessing this is abnormal by your definition.
___
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] Content-Disposition is driving me batty

2006-08-17 Thread Kirk Strauser
On Thursday 17 August 2006 9:54 am, Brian Sullivan wrote:

 I am running IE7 beta 3 -- on my machine the pdf file seems to load --
 so no content disposition problem but there are messages about missing
 fonts from the PDF reader *7.0.8 btw) -- no real information is
 displayed so I am guessing this is abnormal by your definition.

Nuts.  I was trying to generate a clean PDF for testing purposes but looks 
like it didn't work.  I re-uploaded the test file (same URL) with Times New 
Roman and embedded fonts.
-- 
Kirk Strauser
The Day Companies
___
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] Content-Disposition is driving me batty

2006-08-17 Thread David H

Andreas Jung wrote:




--On 16. August 2006 17:28:00 -0500 Kirk Strauser [EMAIL PROTECTED] 
wrote:



I have a Python script that transmits a file to the user.  An excerpt:

if not skipctypeheader:
# Set the content type if one is defined for the file
ctype = file.getProperty('content_type', d=None)
if ctype:
RESPONSE.setHeader('Content-Type', ctype)

RESPONSE.setHeader('Content-Disposition', 'inline; filename=%s' %
filename)



I remember having had similar problems with IE and downloading files. 
In general we use only content-disposition: attachment for IE vs. 
content-disposition: inline for all other browsers. After that change 
we haven't had

any bug reports from IE users.

-aj


I had similar problems too.  This seems to work with IE:
theFile=open( self.pdfpath,'rb')
result = theFile.read()

RESPONSE.setHeader('Content-Type','application/pdf')
RESPONSE.setHeader(Content-Disposition,filename=report.pdf)
RESPONSE.setHeader('Content-Length',len(result))
RESPONSE.write(result)

David

___
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] Content-Disposition is driving me batty

2006-08-17 Thread Brian Sullivan

On 8/17/06, Kirk Strauser [EMAIL PROTECTED] wrote:


Nuts.  I was trying to generate a clean PDF for testing purposes but looks
like it didn't work.  I re-uploaded the test file (same URL) with Times New
Roman and embedded fonts.



OK -- that seems to be more what I would call normal. I see the page
with This is a test in Adobe reader -- but also a page/tab is
created that is blank. Is that the problem?
___
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] Content-Disposition is driving me batty

2006-08-17 Thread Kirk Strauser
On Thursday 17 August 2006 11:02 am, Brian Sullivan wrote:

 OK -- that seems to be more what I would call normal. I see the page
 with This is a test in Adobe reader -- but also a page/tab is
 created that is blank. Is that the problem?

Nope - customers are actually getting a single blank page and nothing else.  
We could live with a blank tab if that was the only problem.
-- 
Kirk Strauser
The Day Companies
___
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] Content-Disposition is driving me batty

2006-08-17 Thread Brian Sullivan

On 8/17/06, Kirk Strauser [EMAIL PROTECTED] wrote:

On Thursday 17 August 2006 11:02 am, Brian Sullivan wrote:

 OK -- that seems to be more what I would call normal. I see the page
 with This is a test in Adobe reader -- but also a page/tab is
 created that is blank. Is that the problem?

Nope - customers are actually getting a single blank page and nothing else.
We could live with a blank tab if that was the only problem.


It looks like you have changed to remove the Content-Disposition header?

Now it comes up inline (I guess the default?).
___
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] Content-Disposition is driving me batty

2006-08-17 Thread Kirk Strauser
On Thursday 17 August 2006 11:24 am, Brian Sullivan wrote:

 It looks like you have changed to remove the Content-Disposition header?

 Now it comes up inline (I guess the default?).

No, it's still there (and still set to inline).  I did, however, follow 
David H's advice to add the Content-Length header.  Preliminary tests are 
very promising.
-- 
Kirk Strauser
The Day Companies
___
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] ldap setup

2006-08-17 Thread Dieter Maurer
Siddharth Sethi wrote at 2006-8-17 09:05 -0400:
 ...
But
the problem that i get is that when i start up my plone site, it prompts
me for my zope username/password. I currently only have 1 user in zope
and that is the admin account and the only other username/password that
works in this prompt is the Manager DN one that i setup for my
LDAPUserFolder. Can any one help me out?

I do not see your problem...

You log in as admin and create further users as required...

Ah, maybe, I understand: in your LDAP lots of users are already defined
and none of them can login (beside the Manager DN). Right?

The fact that the Manager DN works seems to indicate that
you are already talking to LDAP.
However, usually, not the DN is used for login but the login attribute.



-- 
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] Content-Disposition is driving me batty

2006-08-17 Thread Dieter Maurer
Kirk Strauser wrote at 2006-8-16 17:28 -0500:
I have a Python script that transmits a file to the user.  An excerpt:

if not skipctypeheader:
# Set the content type if one is defined for the file
ctype = file.getProperty('content_type', d=None)
if ctype:
RESPONSE.setHeader('Content-Type', ctype)

RESPONSE.setHeader('Content-Disposition', 'inline; filename=%s' % filename)
 
 HTTP/1.1 200 OK
 Date: Wed, 16 Aug 2006 22:26:11 GMT
 Server: Zope/(Zope 2.9.3-, python 2.4.3, freebsd6) ZServer/1.1
 Content-Length: 1742

Your PDF file appears to be small.

I am also surprised that in your earlier post you returned
the File object itself. I would rather expect
str(fileObject.data).



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


[Zope] Python Scripts and HTML Forms

2006-08-17 Thread Muk Yan
Dear Trusted Zope Zealots,This subject was a bit too broad to do a google search on, because I've tried and the lack of relevancy was astounding.I've probably been committing a cardinal sin in DTML, but I couldn't figure any other work around.
I have an HTML form in a DTML Document say:form action="" method=postName:input type=text name:first_name/form
I want to use first_name in a python script, but what I've been doing is setting it in the process_this_form, which is a DTML method:DTML Method, process_this_form:dtml-call REQUEST.SESSION.set
('firstName', first_name)dtml-call this_is_a_python_script()and in the Python Script, this_is_a_python_scriptI use REQUEST.SESSION.get('firstName')What my question is, is there anyway to directly access first_name from the form in the python script without having to have to call the dtml-call 
REQUEST.SESSION.set('firstName', first_name) and then REQUEST.SESSION.get('firstName') in the python script. Sort of a sophomoric question, but any help would be appreciated. Thanks in advance.-Muk
___
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] Python Scripts and HTML Forms

2006-08-17 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 17 Aug 2006, at 14:57, Muk Yan wrote:
What my question is, is there anyway to directly access  
first_name from the form in the python script without having to  
have to call the dtml-call  REQUEST.SESSION.set('firstName',  
first_name) and then REQUEST.SESSION.get('firstName') in the  
python script.  Sort of a sophomoric question, but any help would  
be appreciated.  Thanks in advance.


request.get(MY_VARIABLE)  ???

jens


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

iD8DBQFE5L1nRAx5nvEhZLIRAndPAKCBH00iBFg9n8b9xkAUSAFQzE2v4ACfZEgv
p7G0/4MUGqY8PX3qlThev/U=
=8RqC
-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 )


Re: [Zope] Python Scripts and HTML Forms

2006-08-17 Thread Kirk Strauser
On Thursday 17 August 2006 1:57 pm, Muk Yan wrote:

 Name:input type=text name:first_name

Make that:

   input type=text name=first_name

 DTML Method, process_this_form:
 dtml-call REQUEST.SESSION.set ('firstName', first_name)
 dtml-call this_is_a_python_script()

 and in the Python Script, this_is_a_python_script
 I use REQUEST.SESSION.get('firstName')

Make that:

  dtml-call this_is_a_python_script(request['first_name'])
-- 
Kirk Strauser
The Day Companies
___
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] Python Scripts and HTML Forms

2006-08-17 Thread Kirk Strauser
On Thursday 17 August 2006 2:02 pm, Jens Vagelpohl wrote:

 request.get(MY_VARIABLE)  ???

The one major problem with that is that it ties you to getting information 
from the request.  Better to write a script with explicit parameters and 
call it with those parameters.  Then, you can pull values from a database, 
another Zope object, or anything else.  Also makes testing *much* easier 
(since you can use the Test tab to experiment with it).
-- 
Kirk Strauser
The Day Companies
___
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] Python Scripts and HTML Forms

2006-08-17 Thread Jonathan



Form variables are stored in REQUEST. In a python 
script you gain access to REQUEST by:

REQUEST= container.REQUEST
you can then access the form variables 
by:

fname = REQUEST['first_name']


you can check for the presence of a form variable 
by

if 
REQUEST.has_key('first_name'):

or

if REQUEST.get('first_name', 
None):


hth

Jonathan


  - Original Message - 
  From: 
  Muk Yan 
  To: zope@zope.org 
  Sent: Thursday, August 17, 2006 2:57 
  PM
  Subject: [Zope] Python Scripts and HTML 
  Forms
  Dear Trusted Zope Zealots,This subject was a bit too 
  broad to do a google search on, because I've tried and the lack of relevancy 
  was astounding.I've probably been committing a cardinal sin in DTML, 
  but I couldn't figure any other work around. I have an HTML form in a 
  DTML Document say:form action="" 
  method="post"Name:input type="text" 
  name:"first_name"/form I want to use "first_name" 
  in a python script, but what I've been doing is setting it in the 
  process_this_form, which is a DTML method:DTML Method, 
  process_this_form:dtml-call "REQUEST.SESSION.set ('firstName', 
  first_name)dtml-call "this_is_a_python_script()"and in 
  the Python Script, this_is_a_python_scriptI use 
  REQUEST.SESSION.get('firstName')What my question is, is there anyway 
  to directly access "first_name" from the form in the python script without 
  having to have to call the dtml-call " REQUEST.SESSION.set('firstName', 
  first_name) and then REQUEST.SESSION.get('firstName') in the python 
  script. Sort of a sophomoric question, but any help would be 
  appreciated. Thanks in advance.-Muk
  
  

  ___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] Some users can't view sent PDFs anymore

2006-08-17 Thread Gabriel Genellina

At Thursday 17/8/2006 11:41, Kirk Strauser wrote:


stockexception = 'FileUnavailableError'

# Does the file exist?
if not filename in context.files.objectIds():
raise stockexception


This is unrelated to your main question, but using string exceptions 
is discouraged...



Gabriel Genellina
Softlab SRL 






__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas


___
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] Some users can't view sent PDFs anymore

2006-08-17 Thread Kirk Strauser
On Thursday 17 August 2006 2:39 pm, Gabriel Genellina wrote:

 This is unrelated to your main question, but using string exceptions
 is discouraged...

Yeah, I'm in the process of gradually upgrading from look at me, I'm 
learning Python! code to something a little more presentable.
-- 
Kirk Strauser
The Day Companies
___
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] Content-Disposition is driving me batty

2006-08-17 Thread Kirk Strauser
On Thursday 17 August 2006 1:28 pm, Dieter Maurer wrote:

 Your PDF file appears to be small.

It was pretty dinky earlier (a single line of text).

 I am also surprised that in your earlier post you returned
 the File object itself. I would rather expect
 str(fileObject.data).

Without looking at the source, I'm guessing that ExtFile.__repr__ just calls 
str() anyway.
-- 
Kirk Strauser
The Day Companies
___
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] Python Scripts and HTML Forms

2006-08-17 Thread Muk Yan
Hey Jonathan, All,

Thanks I tried your solution, but it doesn't seem to work. Can anybody
shed some more light on this situation, since what Jonathan provides is
exactly what I want to do, but it's not working.

Am I forgetting to put parameteres or some other newbie mistake like that?

Thanks in advance and thanks again Jonathan.

-MukOn 8/17/06, Jonathan [EMAIL PROTECTED] wrote:







Form variables are stored in REQUEST. In a python 
script you gain access to REQUEST by:

REQUEST= container.REQUEST
you can then access the form variables 
by:

fname = REQUEST['first_name']


you can check for the presence of a form variable 
by

if 
REQUEST.has_key('first_name'):

or

if REQUEST.get('first_name', 
None):


hth

Jonathan


  - Original Message - 
  
From: 
  Muk Yan 
  To: 
zope@zope.org 
  Sent: Thursday, August 17, 2006 2:57 
  PM
  Subject: [Zope] Python Scripts and HTML 
  Forms
  Dear Trusted Zope Zealots,This subject was a bit too 
  broad to do a google search on, because I've tried and the lack of relevancy 
  was astounding.I've probably been committing a cardinal sin in DTML, 
  but I couldn't figure any other work around. I have an HTML form in a 
  DTML Document say:form action="" 
  method=postName:input type=text 
  name:first_name/form I want to use first_name 
  in a python script, but what I've been doing is setting it in the 
  process_this_form, which is a DTML method:DTML Method, 
  process_this_form:dtml-call REQUEST.SESSION.set ('firstName', 
  first_name)dtml-call this_is_a_python_script()and in 
  the Python Script, this_is_a_python_scriptI use 
  REQUEST.SESSION.get('firstName')What my question is, is there anyway 
  to directly access first_name from the form in the python script without 
  having to have to call the dtml-call  REQUEST.SESSION.set('firstName', 
  first_name) and then REQUEST.SESSION.get('firstName') in the python 
  script. Sort of a sophomoric question, but any help would be 
  appreciated. Thanks in advance.-Muk
  
  

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


Re: [Zope] Python Scripts and HTML Forms

2006-08-17 Thread Jonathan



What does "it doesn't seem to work" mean? 
Error messages/traceback? What does your form  script contain? More 
info on the problem is definitely required!



Jonathan

  - Original Message - 
  From: 
  Muk Yan 
  To: Jonathan ; zope@zope.org 
  Sent: Thursday, August 17, 2006 4:20 
  PM
  Subject: Re: [Zope] Python Scripts and 
  HTML Forms
  Hey Jonathan, All,Thanks I tried your solution, but it 
  doesn't seem to work. Can anybody shed some more light on this 
  situation, since what Jonathan provides is exactly what I want to do, but it's 
  not working.Am I forgetting to put parameteres or some other newbie 
  mistake like that?Thanks in advance and thanks again 
  Jonathan.-Muk
  On 8/17/06, Jonathan [EMAIL PROTECTED] wrote:
  


Form variables are stored in REQUEST. In a 
python script you gain access to REQUEST by:

REQUEST= 
container.REQUEST
you can then access the form variables 
by:

fname = REQUEST['first_name']


you can check for the presence of a form 
variable by

if 
REQUEST.has_key('first_name'):

or

if REQUEST.get('first_name', 
None):


hth

Jonathan



- 
Original Message - 
From: 
Muk Yan 
To: 
zope@zope.org 
Sent: 
Thursday, August 17, 2006 2:57 PM
Subject: 
[Zope] Python Scripts and HTML Forms
Dear Trusted Zope Zealots,This subject was a bit too 
broad to do a google search on, because I've tried and the lack of relevancy 
was astounding.I've probably been committing a cardinal sin in DTML, 
but I couldn't figure any other work around. I have an HTML form in 
a DTML Document say:form action="" 
method="post"Name:input type="text" 
name:"first_name"/form I want to use 
"first_name" in a python script, but what I've been doing is setting it in 
the process_this_form, which is a DTML method:DTML Method, 
process_this_form:dtml-call "REQUEST.SESSION.set ('firstName', 
first_name)dtml-call "this_is_a_python_script()"and 
in the Python Script, this_is_a_python_scriptI use 
REQUEST.SESSION.get('firstName')What my question is, is there anyway 
to directly access "first_name" from the form in the python script without 
having to have to call the dtml-call " REQUEST.SESSION.set('firstName', 
first_name) and then REQUEST.SESSION.get('firstName') in the python 
script. Sort of a sophomoric question, but any help would be 
appreciated. Thanks in advance.-Muk




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


Re: [Zope] Python Scripts and HTML Forms

2006-08-17 Thread Muk Yan
Hey All,Sorry about that, what I meant is that I get a KeyError. It says that the first_name in REQUEST['first_name'] is not found, when I try to set the variable in line in the script where 
fname = REQUEST['first_name'].Thanks in advance.Cheers,MukOn 8/17/06, Jonathan 
[EMAIL PROTECTED] wrote:






What does it doesn't seem to work mean? 
Error messages/traceback? What does your form  script contain? More 
info on the problem is definitely required!



Jonathan

  - Original Message - 
  
From: 
  Muk Yan 
  To: 
Jonathan ; zope@zope.org 
  Sent: Thursday, August 17, 2006 4:20 
  PM
  Subject: Re: [Zope] Python Scripts and 
  HTML Forms
  Hey Jonathan, All,Thanks I tried your solution, but it 
  doesn't seem to work. Can anybody shed some more light on this 
  situation, since what Jonathan provides is exactly what I want to do, but it's 
  not working.Am I forgetting to put parameteres or some other newbie 
  mistake like that?Thanks in advance and thanks again 
  Jonathan.-Muk
  On 8/17/06, Jonathan [EMAIL PROTECTED] wrote:

  


Form variables are stored in REQUEST. In a 
python script you gain access to REQUEST by:

REQUEST= 
container.REQUEST
you can then access the form variables 
by:

fname = REQUEST['first_name']


you can check for the presence of a form 
variable by

if 
REQUEST.has_key('first_name'):

or

if REQUEST.get('first_name', 
None):


hth

Jonathan



- 
Original Message - 

From: 
Muk Yan 
To: 
zope@zope.org 
Sent: 
Thursday, August 17, 2006 2:57 PM
Subject: 
[Zope] Python Scripts and HTML Forms
Dear Trusted Zope Zealots,This subject was a bit too 
broad to do a google search on, because I've tried and the lack of relevancy 
was astounding.I've probably been committing a cardinal sin in DTML, 
but I couldn't figure any other work around. I have an HTML form in 
a DTML Document say:form action="" 
method=postName:input type=text 
name:first_name/form I want to use 
first_name in a python script, but what I've been doing is setting it in 
the process_this_form, which is a DTML method:DTML Method, 
process_this_form:dtml-call REQUEST.SESSION.set ('firstName', 
first_name)dtml-call this_is_a_python_script()and 
in the Python Script, this_is_a_python_scriptI use 
REQUEST.SESSION.get('firstName')What my question is, is there anyway 
to directly access first_name from the form in the python script without 
having to have to call the dtml-call  REQUEST.SESSION.set('firstName', 
first_name) and then REQUEST.SESSION.get('firstName') in the python 
script. Sort of a sophomoric question, but any help would be 
appreciated. Thanks in advance.-Muk




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


Re: [Zope] Python Scripts and HTML Forms

2006-08-17 Thread Jonathan



If you have a line like

input type="text" name="first_name" 
value="default value"

in your html file then if you try the following in 
your script file

print REQUEST['first_name'] 
return printed

you should see "default value" printed 
out

you can try:

print REQUEST

to see the entire contents of REQUEST (very 
informative)

Note: if you do not have a default value in your 
input statement and you do not enter anything in the input field when 
the form is displayed, then when the form is submitted REQUEST will not contain 
an entry for the corresponding form field (an entry is made in REQUEST only when 
data is entered in the form field)


Jonathan



  - Original Message - 
  From: 
  Muk Yan 
  To: Jonathan 
  Cc: zope@zope.org 
  Sent: Thursday, August 17, 2006 4:40 
  PM
  Subject: Re: [Zope] Python Scripts and 
  HTML Forms
  Hey All,Sorry about that, what I meant is that I get a 
  KeyError. It says that the first_name in REQUEST['first_name'] is not found, 
  when I try to set the variable in line in the script where fname = 
  REQUEST['first_name'].Thanks in 
  advance.Cheers,Muk
  On 8/17/06, Jonathan  
  [EMAIL PROTECTED] wrote:
  


What does "it doesn't seem to work" mean? 
Error messages/traceback? What does your form  script contain? 
More info on the problem is definitely required!




Jonathan



- 
Original Message - 
From: 
Muk Yan 

To: 
Jonathan ; zope@zope.org 
Sent: 
Thursday, August 17, 2006 4:20 PM
Subject: 
Re: [Zope] Python Scripts and HTML Forms
Hey Jonathan, All,Thanks I tried your solution, but 
it doesn't seem to work. Can anybody shed some more light on this 
situation, since what Jonathan provides is exactly what I want to do, but 
it's not working.Am I forgetting to put parameteres or some other 
newbie mistake like that?Thanks in advance and thanks again 
Jonathan.-Muk
On 8/17/06, Jonathan [EMAIL PROTECTED] wrote: 


  
  
  Form variables are stored in REQUEST. In a 
  python script you gain access to REQUEST by:
  
  REQUEST= 
  container.REQUEST
  you can then access the form variables 
  by:
  
  fname = REQUEST['first_name']
  
  
  you can check for the presence of a form 
  variable by
  
  if 
  REQUEST.has_key('first_name'):
  
  or
  
  if REQUEST.get('first_name', 
  None):
  
  
  hth
  
  Jonathan
  
  
  
  - 
  Original Message - 
  From: 
  Muk Yan 
  To: 
  zope@zope.org 
  Sent: 
  Thursday, August 17, 2006 2:57 PM
  Subject: 
  [Zope] Python Scripts and HTML Forms
  Dear Trusted Zope Zealots,This subject was a bit 
  too broad to do a google search on, because I've tried and the lack of 
  relevancy was astounding.I've probably been committing a cardinal 
  sin in DTML, but I couldn't figure any other work around. I have 
  an HTML form in a DTML Document say:form 
  action="" method="post"Name:input type="text" 
  name:"first_name"/form I want to use 
  "first_name" in a python script, but what I've been doing is setting it in 
  the process_this_form, which is a DTML method:DTML Method, 
  process_this_form:dtml-call "REQUEST.SESSION.set ('firstName', 
  first_name)dtml-call 
  "this_is_a_python_script()"and in the Python Script, 
  this_is_a_python_scriptI use 
  REQUEST.SESSION.get('firstName')What my question is, is there 
  anyway to directly access "first_name" from the form in the python script 
  without having to have to call the dtml-call " 
  REQUEST.SESSION.set('firstName', first_name) and then 
  REQUEST.SESSION.get('firstName') in the python script. Sort of a 
  sophomoric question, but any help would be appreciated. Thanks in 
  advance.-Muk
  
  
  

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


Re: [Zope] Python Scripts and HTML Forms

2006-08-17 Thread Gabriel Genellina

At Thursday 17/8/2006 17:40, Muk Yan wrote:

Sorry about that, what I meant is that I get a KeyError. It says 
that the first_name in REQUEST['first_name'] is not found, when I 
try to set the variable in line in the script where fname = 
REQUEST['first_name'].


Read the previous responses, you had an error in your html form, have 
you fixed it?




Gabriel Genellina
Softlab SRL 






__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas


___
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] CMF 1.5.7-beta released

2006-08-17 Thread Jens Vagelpohl

The CMF developer community is pleased to announce the release of
version 1.5.7-beta of the Zope Content Management Framework (CMF).
This release is intended for testing purposes only;  we
do not recommend deploying it to production servers.  The final release
of version 1.5.6 is expected on Sunday, February 26 2006.

What is the CMF?

  The Zope Content Management Framework provides a set of services and
  content objects useful for building highly dynamic, content-oriented
  portal sites.  As packaged, the CMF generates a site much like the
  zope.org site.  The CMF is intended to be easily customizable, in  
terms

  of both the types of content used and the policies and services it
  provides.

What's new in this release?

  The 1.5.7-beta release represents a pure bug fix/maintenance release
  without feature additions.

Where do I get it?

  Download it from http://www.zope.org/Products/CMF/CMF-1.5.7-beta

  Points of interest include:

  - Windows ZIP file:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/CMF-1.5.7-beta.zip

  - Unix tar/gzip archive:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/CMF-1.5.7- 
beta.tar.gz


  - Release notes:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/README.txt

  - Change history:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/CHANGES.txt

  - Installation instructions:
http://www.zope.org/Products/CMF/CMF-1.5.7-beta/INSTALL.txt

  - CMF Release Roadmap:
http://www.zope.org/Products/CMF/docs/roadmap

Where do I go to learn more?

  The CMF mailing list ([EMAIL PROTECTED]) has many participants who  
are

  active in supporting the CMF.

...to report bugs?

  The CMF Collector at http://www.zope.org/Collectors/CMF is the  
place to

  report bugs (please search for existing reports of your issue first!)


-
Jens Vagelpohl
[EMAIL PROTECTED]

___
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: Content-Disposition is driving me batty

2006-08-17 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dieter Maurer wrote:
 Kirk Strauser wrote at 2006-8-16 17:28 -0500:
 I have a Python script that transmits a file to the user.  An excerpt:

if not skipctypeheader:
# Set the content type if one is defined for the file
ctype = file.getProperty('content_type', d=None)
if ctype:
RESPONSE.setHeader('Content-Type', ctype)

RESPONSE.setHeader('Content-Disposition', 'inline; filename=%s' % 
 filename)
 
  HTTP/1.1 200 OK
  Date: Wed, 16 Aug 2006 22:26:11 GMT
  Server: Zope/(Zope 2.9.3-, python 2.4.3, freebsd6) ZServer/1.1
  Content-Length: 1742
 
 Your PDF file appears to be small.
 
 I am also surprised that in your earlier post you returned
 the File object itself. I would rather expect
 str(fileObject.data).

That would defeat the stream iterator optimimzation, wouldn't it?


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

iD8DBQFE5UQy+gerLs4ltQ4RAiglAJ4x7yj4Bbjv3kdZQTh+wGu04mrK4QCfdQ6u
ZDkFQsOnTNLXZXSwK/TTyds=
=AtDI
-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 )