Re: [Zope] Which sound I learn?

2005-04-27 Thread Cliff Ford
I produced a heavily customised site with Zope 2 that I am currently
rebuilding in Zope 3. Even so, I feel hesitant to advise. I guess, with
the advent of Five, then Zope 3 is the way to go if you are familiar
with Python and xml. There are two recent, good Zope 3 books you can
work through. I have found learning how to do things that are not in the
Zope 3 books time-consuming, fortunately not an issue for me, but I
think it will all work out with less code that is easier to maintain.
Cliff
Ryan Smiderle wrote:
I'm planning on making a website with Zope, and plan to do a lot of 
custumization.
Should I learn Zope 2 or Zope 3?

Thanks,
-Ryan


___
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] Forcing all Zope access to come through an Apache/SSL proxy

2005-04-27 Thread Reuven M. Lerner
I've written a Zope application that needs to be behind SSL.  I assumed 
that the most straightforward way to do this would be to (1) set up Zope 
on port 8080 and (2) use Apache to act as a proxy between the outside 
world and Zope.  Unfortunately, while it was a piece of cake to set up a 
proxy for non-SSL access to Zope, I'm rather stumped regarding SSL.  
I've done non-SSL proxying for years with mod_rewrite, and it was really 
a snap, so I'm surprised that this is so difficult.

Zope is working just fine when I access it directly (using HTTP) on port 
8080.  I have installed the (self-signed) SSL certificate into Apache 
without any trouble, and am able to access individual documents on disk 
via SSL, using Apache.  So if all I would want is to use Apache with 
SSL, I would be done by now. 

Here is the relevant portion of the Apache configuration file (with 
names and numbers changed somewhat):

   
   ServerName myserver.com
   ServerAdmin [EMAIL PROTECTED]
   SSLProxyEngine on
   RewriteEngine On
   RewriteRule ^/(.*)
   http://localhost:8080/VirtualHostBase/https/myserver.com:443/app/$1
   [L,P]
   
The above should make it possible (I believe), an HTTPS connection 
between my browser and my cup.  Apache should then take that incoming 
SSL request and issue its own request to the Zope server.  Zope will 
respond, sending it back to Apache, which (in turn) sends it back to me.

But of course, that doesn't happen.   Zope's provides indicates that 
many of the requests begin with "\x80g\x01\x03".  My guess is that the 
SSL request is being piped to Zope directly, but it's hard to know from 
just a few characters.  Does this mean that I need to do some more 
translating, from HTTP into HTTPS?   

Not that it should make any difference, but I'm running Apache 2.0.52 on 
Red Hat Enterprise 4.0, with Zope 2.7.5 and Python 2.3.4.

Thanks in advance for any advice you might have,
Reuven
___
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] problems rendering objects stored in the local file system

2005-04-27 Thread Cliff Ford
You have at least two choices:
1. Use apache and don't fetch index.html and the images through zope. 
Most installations use apache in front of zope, so this is just a matter 
of rewrite rules.

2. Use an External Method and make each image src attribute a function 
call, passing the image url as a paramter, for example:


If you do that, make sure you include code to check that a malicious 
user cannot fetch any file from your file system. There have been some 
recent (this year) posts of example code you can google for.

Cliff
Dennis Allison wrote:
I am having trouble figuring out how to get Zope to access and render 
html and images files properly in the following context:

In the local file system (that is, the Linux file system to be explicit) I
have a collection of directories each containing an index.html file
consisting of HTML and a collection of image files (*.jpg, *.gif, *.swf)
referenced by the HTML.  From a DTML object in the ZODB, I want to render
the index.html and have it properly access the local image files.  
Calling the file "index.html" may be a bad name choice because it may be
interpreted especially. In fact, what I really would like to be able to do
is to reference all files relatively and allow internal directories and
the like.  We've been using the LocalFS product, mostly with great
success, but this has got me stumped.

Any suggestions? hints? pointers?
___
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] problems rendering objects stored in the local file system

2005-04-27 Thread Andreas Jung

--On Mittwoch, 27. April 2005 19:57 Uhr -0700 Dennis Allison 
<[EMAIL PROTECTED]> wrote:

In the local file system (that is, the Linux file system to be explicit) I
have a collection of directories each containing an index.html file
consisting of HTML and a collection of image files (*.jpg, *.gif, *.swf)
referenced by the HTML.  From a DTML object in the ZODB, I want to render
the index.html and have it properly access the local image files.
The index.html has nothing to do with your stuff in the filesystem. You 
reference
images through an URL in the 
is located behind the URL is in charge to send the image data to the client
(it does not matter where the image is actually stored (filesystem, memory,
moon).  Bascially the method is called (requested) from the client through
HTTP and it has to send the data + the corresponding HTTP header telling the
client: I am an image of type XXX.

-aj



pgpHT4GLaSqFr.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] zope-2.8b1, zclass and five documentation

2005-04-27 Thread Andreas Jung

--On Donnerstag, 28. April 2005 10:02 Uhr +0800 Bakhtiar A Hamid 
<[EMAIL PROTECTED]> wrote:

since zope2.8 comes with five, is there any documentation/tutorials on
how to actually use it?  i've looked at Five/docs/*txt and FiveDemo*.
it seems that i may need to grok (or at least know *something* about)
zope3  to actually use five.
You might look at the TextIndexNG 3 CVS repository 
(sf.net/projects/textindexng)
as an example.

-aj


pgppkjJf1NT9q.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] problems rendering objects stored in the local file system

2005-04-27 Thread Dennis Allison

I am having trouble figuring out how to get Zope to access and render 
html and images files properly in the following context:

In the local file system (that is, the Linux file system to be explicit) I
have a collection of directories each containing an index.html file
consisting of HTML and a collection of image files (*.jpg, *.gif, *.swf)
referenced by the HTML.  From a DTML object in the ZODB, I want to render
the index.html and have it properly access the local image files.  
Calling the file "index.html" may be a bad name choice because it may be
interpreted especially. In fact, what I really would like to be able to do
is to reference all files relatively and allow internal directories and
the like.  We've been using the LocalFS product, mostly with great
success, but this has got me stumped.

Any suggestions? hints? pointers?

-- 
Dennis Allison * Computer Systems Laboratory * Gates 227
   * Stanford University *  Stanford CA  94305
   * (650) 723-9213 * (650) 723-0033 fax
   * [EMAIL PROTECTED]
   * [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] zope-2.8b1, zclass and five documentation

2005-04-27 Thread Bakhtiar A Hamid
that's a mouthful subject :P

i've downloaded and installed zope 2.8 b1.  

wondered whether zclass is still b0rked in zope2.8r1.  nothing
mentioned in the CHANGES.txt.  probably is.  created zclasses ok. 
however instantiating the zclass requires authentication that will
never go thru.

since zope2.8 comes with five, is there any documentation/tutorials on
how to actually use it?  i've looked at Five/docs/*txt and FiveDemo*. 
it seems that i may need to grok (or at least know *something* about)
zope3  to actually use five.

thanks for any urls/pointers/etc
  

-- 
http://myzope.kedai.com.my - my-zope 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] Re: Zeo

2005-04-27 Thread Bakhtiar A Hamid
On 4/27/05, ken wood <[EMAIL PROTECTED]> wrote:
> >
> Hey guys,
> I appreciate all the great tips on the cionfiguration issue. But my main 
> issue is about infrastructure:
> Which hardware and / or operating systems can be used for a Zope/Zeo 
> system.
> In particular, can I run a Zope instance on my Win32 server and have a 
> Zeo Server/Clients on my Linux server?
> If I use all the same versions (Python, Zope and Plone and Products) can 
> I use a multi-OS infratructure?
> Thanks,
> ken wood

this is what i've learned:
-get as much RAM as you possibly can, esp for zeo clients
-smp not required on zeo clients
-go the unix way, if possible for zeo is much older on unix compared
to windows, iirc
-hardware need not be the same specifications.  just make sure your
load balancer can distinguish the difference

..can't think of any now..



> 

-- 
http://myzope.kedai.com.my - my-zope 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 )


Re: [Zope] Generating and Downloading PDF.

2005-04-27 Thread J Cameron Cooper
Fernando Lujan wrote:
J Cameron Cooper wrote:
Fernando Lujan wrote:
J Cameron Cooper wrote:
The method that contains your code must have at least the first 
parameter 'self'::

  def pdfwrite(self):
R = self.REQUEST.RESPONSE
R.setHeader('content-type', 'application/rtf')
R.setHeader('content-length', str(len(data)))
R.write(data)
It's a way of getting access to context.

OK, thanks. But how can I pass the self parameter using the dtml-call 
tag?  is correct? Because I'm using this 
and works fine.

It's Python magic. When you call a function/method on an object, the 
object is provided as the first parameter of the method. This is 
implicit, I believe, in DTML calls, either expression or name. It's 
explicit in TALES and Python::

   context/pdfwrite
   context.pdfwrite()

So, I put the code here. Please, what I'm missing? :)
It's easier to guess when you say what the problem is.
I do see some funny indentation down at the bottom.
--jcc
def gerarTCE(self, id_tce, cnpj_escola='', matricula=''):
   from reportlab.lib.colors import Color
   from reportlab.lib.pagesizes import letter
   from reportlab.platypus import Paragraph, SimpleDocTemplate, XBox
   from reportlab.lib.styles import ParagraphStyle
   from reportlab.pdfgen import canvas
   import os
   import urllib
   from reportlab.lib.units import inch, cm
   import time
   import string
   _linha = cm / 2.25
   _fname = "tce"+id_tce+".pdf"
   _c = canvas.Canvas(_fname, pagesize=letter)
   _width, _height = letter
   _aW = _width - 2 * cm
   _aH = 750
   _c.bookmarkPage("TCE")
   _c.bookmarkPage("pagina1")
   _c.addOutlineEntry("TCE", "TCE")
   _c.addOutlineEntry("Pagina 1", "pagina1", 1)
   _c.showOutline()
   _c.setAuthor("NUBE - Núcleo Brasileiro de Estágios")
   _c.scale(1, 0.9)
   _c.setFont("Times-Bold", 16)
   _c.drawCentredString(_width / 2, 735, "TERMO ADITIVO")
   _c.setFont("Times-Roman", 9)
   _c.drawCentredString( _width / 2, 735, "(determinações legais 
estabelecidas no art. 5º e o §1º do art. 6º do Decreto 87.497/82 que 
regulamentou a Lei 6.494/77)")
 _c.drawCentredString( _width / 2, 725, "(Atualizada pela Medida 
Provisória N.º  1952-22 de 30/03/2000)")
 _c.showPage()
   _c.save()
 R = self.REQUEST.RESPONSE
   R.setHeader('content-type', 'application/pdf')
R.Header('content-length', str(len(_fname)))
   R.write(_fname)

--
http://plonebook.packtpub.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] Generating and Downloading PDF.

2005-04-27 Thread Fernando Lujan
J Cameron Cooper wrote:
Fernando Lujan wrote:
J Cameron Cooper wrote:
The method that contains your code must have at least the first 
parameter 'self'::

  def pdfwrite(self):
R = self.REQUEST.RESPONSE
R.setHeader('content-type', 'application/rtf')
R.setHeader('content-length', str(len(data)))
R.write(data)
It's a way of getting access to context.

OK, thanks. But how can I pass the self parameter using the dtml-call 
tag?  is correct? Because I'm using this 
and works fine.

It's Python magic. When you call a function/method on an object, the 
object is provided as the first parameter of the method. This is 
implicit, I believe, in DTML calls, either expression or name. It's 
explicit in TALES and Python::

   context/pdfwrite
   context.pdfwrite()

So, I put the code here. Please, what I'm missing? :)
def gerarTCE(self, id_tce, cnpj_escola='', matricula=''):
   from reportlab.lib.colors import Color
   from reportlab.lib.pagesizes import letter
   from reportlab.platypus import Paragraph, SimpleDocTemplate, XBox
   from reportlab.lib.styles import ParagraphStyle
   from reportlab.pdfgen import canvas
   import os
   import urllib
   from reportlab.lib.units import inch, cm
   import time
   import string
   _linha = cm / 2.25
   _fname = "tce"+id_tce+".pdf"
   _c = canvas.Canvas(_fname, pagesize=letter)
   _width, _height = letter
   _aW = _width - 2 * cm
   _aH = 750
   _c.bookmarkPage("TCE")
   _c.bookmarkPage("pagina1")
   _c.addOutlineEntry("TCE", "TCE")
   _c.addOutlineEntry("Pagina 1", "pagina1", 1)
   _c.showOutline()
   _c.setAuthor("NUBE - Núcleo Brasileiro de Estágios")
   _c.scale(1, 0.9)
   _c.setFont("Times-Bold", 16)
   _c.drawCentredString(_width / 2, 735, "TERMO ADITIVO")
   _c.setFont("Times-Roman", 9)
   _c.drawCentredString( _width / 2, 735, "(determinações legais 
estabelecidas no art. 5º e o §1º do art. 6º do Decreto 87.497/82 que 
regulamentou a Lei 6.494/77)")
 _c.drawCentredString( _width / 2, 725, "(Atualizada pela Medida 
Provisória N.º  1952-22 de 30/03/2000)")
  
   _c.showPage()
   _c.save()
  
   R = self.REQUEST.RESPONSE
   R.setHeader('content-type', 'application/pdf')
R.Header('content-length', str(len(_fname)))
   R.write(_fname)

___
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] Which sound I learn?

2005-04-27 Thread Jonathan Cyr




Seems to be the thousand dollar
question.

Depends on the scope of your project...

Zope 2 is seasoned, and has lots of advantages... existing products,
toolsets, list expertise, and user base.  Better for the short-term
time investment.

Zope 3 seems to be the next big thing... benefitting greatly from the
lessons-learned and problems of Zope 2.  A very impressive concept for
a longer investment period.  Early-on in the maturity cycle.

But, apparently, they are very different in execution, but similar in
concept.  I'm about halfway through the new Zope 3 book, its
significantly different.  It appears both versions will be around for
years.

Just the impressions that I've gotten from monitoring both lists.

-Jon Cyr
WeddingWeblog.com

Ryan Smiderle wrote:

I'm planning on making a website with Zope, and plan to do a lot of
custumization.
Should I learn Zope 2 or Zope 3?
  
Thanks,
  
-Ryan
  
  

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

No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.3 - Release Date: 4/25/2005
  



___
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: Zeo

2005-04-27 Thread Jonathan Cyr




FYI,

Back during 2.6.x, I developed my whole system on a Windows Laptop,
migrated to a Windows ZEO System, 1 client, 1 server.   Then moved the
ZEO client & server to Red Hat AS 2.1, and now finally to SuSE
9.0.   The only differences for me were the steps in installing PIL
(Python Imaging Library) on Linux vs. Windows.  I had to wait to be
more comfortable deploying on Linux, but Zope was obviously ready for
Linux long before I was.

If you can stay away from platform-dependent products, and their
dependencies, (Photo Product & ImageMagick for one), you should be
able to mix and match.  The underlying python seems to facilitate this
being a sort of intermediary compatibilty layer.  My approach was to
make sure every component and dependency was python based.

Make sure to follow the directions for ZEO client/server compatibility,
but those are python concerns.  

As for performance, I found Linux to be a large boost, especially when
run without a GUI... the nature of the beast seems to lean toward Linux
for good reason.

The other item you'll find on the list, is that a ZEO configuration is
much more stable and forgiving than the quite-stable stand-alone Zope. 
Even internal Zope routines run better in a ZEO setup.  

-Jon Cyr
WeddingWeblog.com

J Cameron Cooper wrote:
ken
wood wrote:
  
  
  I appreciate all the great tips on the
cionfiguration issue. But my main issue is about infrastructure:

Which hardware and / or operating systems can be used for a Zope/Zeo
system.

  
  
OS: pretty much any Unixish OS, though on anything but Linux, BSD, and
Mac OS X (and maybe Solaris) you may run into some small problems. Also
Windows.
  
  
Hardware: anything with enough juice that can run your OS. Not very
specific, I know, but it all depends on the performance you need. Less
than .5 hits/sec and pretty much anything that'll load Zope will work.
  
  
  In particular, can I run a Zope instance on
my Win32 server and have a Zeo Server/Clients on my Linux server?

  
  
Sure. Why not?
  
  
  If I use all the same versions (Python, Zope
and Plone and Products) can I use a multi-OS infratructure?

  
  
Almost certainly. There are a few OS-specific Products, though, but
that only matters on the ZEO client (except for storages, which only
matter on the ZEO server.)
  
  
You don't even have to match versions, save for sanity. ZEO is not a
tightly-coupled communications protocol. Consider:
  
  
Windows
  
  Python 2.3.4
  
  Zope 2.7.5
  
  ZEO client - SomeProduct 1.1
  
  
Linux
  
  Python 2.3.3
  
  Zope 2.7.3
  
  ZEO server - no products
  
  ZEO client - SomeProduct 1.0
  
    ZEO command line client, for debugging
  
  
This would work fine. All three ZEO clients would have the same data
(that from the ZEO server), even with different software.
  
  
    --jcc
  
___
  
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] Generating and Downloading PDF.

2005-04-27 Thread J Cameron Cooper
Fernando Lujan wrote:
J Cameron Cooper wrote:
The method that contains your code must have at least the first 
parameter 'self'::

  def pdfwrite(self):
R = self.REQUEST.RESPONSE
R.setHeader('content-type', 'application/rtf')
R.setHeader('content-length', str(len(data)))
R.write(data)
It's a way of getting access to context.
OK, thanks. But how can I pass the self parameter using the dtml-call 
tag?  is correct? Because I'm using this and 
works fine.
It's Python magic. When you call a function/method on an object, the 
object is provided as the first parameter of the method. This is 
implicit, I believe, in DTML calls, either expression or name. It's 
explicit in TALES and Python::

   context/pdfwrite
   context.pdfwrite()
It's different than many other languages, but it turns out to be pretty 
useful.

		--jcc
--
http://plonebook.packtpub.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] Generating and Downloading PDF.

2005-04-27 Thread Fernando Lujan
J Cameron Cooper wrote:
The method that contains your code must have at least the first 
parameter 'self'::

  def pdfwrite(self):
R = self.REQUEST.RESPONSE
R.setHeader('content-type', 'application/rtf')
R.setHeader('content-length', str(len(data)))
R.write(data)
It's a way of getting access to context.

OK, thanks. But how can I pass the self parameter using the dtml-call 
tag?  is correct? Because I'm using this and 
works fine.

Fernando Lujan
___
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] Generating and Downloading PDF.

2005-04-27 Thread Andreas Jung

--On Mittwoch, 27. April 2005 15:56 Uhr -0300 Fernando Lujan 
<[EMAIL PROTECTED]> wrote:
Is there some import wich I have been missing?
At least we  are missing the *complete* definition of the method.
Your code fragment is insufficient.
-aj


pgpURp1R95QIW.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] Generating and Downloading PDF.

2005-04-27 Thread J Cameron Cooper
Fernando Lujan wrote:
Hi guys,
I'm creating a pdf using reportlab, after the canvas.close()
I put the following code inside a External Method:
R = self.REQUEST.RESPONSE
R.setHeader('content-type', 'application/rtf')
R.setHeader('content-length', str(len(data)))
R.write(data)
But I receive the following error:
*Error Type: NameError*
*Error Value: global name 'self' is not defined
Is there some import wich I have been missing?
The method that contains your code must have at least the first 
parameter 'self'::

  def pdfwrite(self):
R = self.REQUEST.RESPONSE
R.setHeader('content-type', 'application/rtf')
R.setHeader('content-length', str(len(data)))
R.write(data)
It's a way of getting access to context.
		--jcc
--
http://plonebook.packtpub.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] Generating and Downloading PDF.

2005-04-27 Thread Fernando Lujan
Hi guys,
I'm creating a pdf using reportlab, after the canvas.close()
I put the following code inside a External Method:
R = self.REQUEST.RESPONSE
R.setHeader('content-type', 'application/rtf')
R.setHeader('content-length', str(len(data)))
R.write(data)
But I receive the following error:
*Error Type: NameError*
*Error Value: global name 'self' is not defined
Is there some import wich I have been missing?
Fernando Lujan
___
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] problem using ssl from zope

2005-04-27 Thread Laura Skosnik
Hello,
We are having a similiar problem, did you ever find a solution to this 
issue?

When we test in the python console, the connection is fine.  We get this 
error from python 2.3.5 when making secure socket
connections from my mod_python based application. It is very odd
because we cannot replicate this in the development environment, only in
production on a cluster of 2 debian boxes with Apache2 MPM Worker w/ Mod
Python 3.13.

Does anybody have any ideas as to what could be causing this error?
Here is the full traceback:
Traceback: File
"/home/orderform/www/cgi-bin/OrderForm_bundle/hwmodules/register/dp_registrar/DPRegistrar.py", 

line 95, in _
_execCmd
con.endheaders()
File "/usr/lib/python2.3/httplib.py", line 715, in endheaders
self._send_output()
File "/usr/lib/python2.3/httplib.py", line 600, in _send_output
self.send(msg)
File "/usr/lib/python2.3/httplib.py", line 567, in send
self.connect()
File "/usr/lib/python2.3/httplib.py", line 988, in connect
ssl = socket.ssl(sock, self.key_file, self.cert_file)
File "/usr/lib/python2.3/socket.py", line 73, in ssl
return _realssl(sock, keyfile, certfile)
TypeError: ssl() argument 1 must be _socket.socket, not _socketobject
The thing is that if we restart the web server, it works fine for about
20 minutes after which we start getting these errors.
Any help would be appreciated.
Thanks,
Laura
___
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] Which sound I learn?

2005-04-27 Thread J Cameron Cooper
Ryan Smiderle wrote:
I'm planning on making a website with Zope, and plan to do a lot of 
custumization.
Should I learn Zope 2 or Zope 3?
If it's from scratch and you don't need any existing third-party 
Products, then probably Zope 3.

Zope 2.8 will include Five, which makes Zope 3-style stuff available in 
Zope 2: http://codespeak.net/z3/five/index.html

		--jcc
--
http://plonebook.packtpub.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] Which sound I learn?

2005-04-27 Thread Ryan Smiderle
I'm planning on making a website with Zope, and plan to do a lot of custumization.
Should I learn Zope 2 or Zope 3?

Thanks,

-Ryan___
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] Mailboxer & subscription box

2005-04-27 Thread Norbert M Haigermoser
hi !
i want to use (plone)Mailboxer as a newsletter system.
is there a posibility to create a web-form to handle the
un / subscription ?
(like: Please enter your emailaddress here and press the send-button)
thanks for help
Norbert
___
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: Zeo

2005-04-27 Thread J Cameron Cooper
ken wood wrote:
I appreciate all the great tips on the cionfiguration issue. But my main 
issue is about infrastructure:
Which hardware and / or operating systems can be used for a Zope/Zeo 
system.
OS: pretty much any Unixish OS, though on anything but Linux, BSD, and 
Mac OS X (and maybe Solaris) you may run into some small problems. Also 
Windows.

Hardware: anything with enough juice that can run your OS. Not very 
specific, I know, but it all depends on the performance you need. Less 
than .5 hits/sec and pretty much anything that'll load Zope will work.

In particular, can I run a Zope instance on my Win32 server and have a 
Zeo Server/Clients on my Linux server?
Sure. Why not?
If I use all the same versions (Python, Zope and Plone and Products) can 
I use a multi-OS infratructure?
Almost certainly. There are a few OS-specific Products, though, but that 
only matters on the ZEO client (except for storages, which only matter 
on the ZEO server.)

You don't even have to match versions, save for sanity. ZEO is not a 
tightly-coupled communications protocol. Consider:

Windows
  Python 2.3.4
  Zope 2.7.5
  ZEO client - SomeProduct 1.1
Linux
  Python 2.3.3
  Zope 2.7.3
  ZEO server - no products
  ZEO client - SomeProduct 1.0
ZEO command line client, for debugging
This would work fine. All three ZEO clients would have the same data 
(that from the ZEO server), even with different software.

		--jcc
___
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: Zope job

2005-04-27 Thread Michael Haubenwallner
Ben Mason wrote:
Sorry for the off-topic question...
Does anyone know the best place to look for Zope / Plone jobs in London?
Look at
http://www.google.com/search?q=zope+jobs+london
Michael
--
http://zope.org/Members/d2m
http://planetzope.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] Zope job

2005-04-27 Thread Ben Mason
Sorry for the off-topic question...

Does anyone know the best place to look for Zope / Plone jobs in London?

Any help would be appreciated.

Thanks

Ben

___
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: Zeo

2005-04-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

ken wood wrote:

> I appreciate all the great tips on the cionfiguration issue. But my main
> issue is about infrastructure:
> Which hardware and / or operating systems can be used for a Zope/Zeo
> system.
> In particular, can I run a Zope instance on my Win32 server and have a
> Zeo Server/Clients on my Linux server?
> If I use all the same versions (Python, Zope and Plone and Products) can
> I use a multi-OS infratructure?

Yes.  The ZEO server does not need to have any of your products, or even
Zope installed;  it can be run from the "standalone" ZODB release which
corresponds to the Zope release you are running on the appservers.

Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCb4vTGqWXf00rNCgRAsHJAJ9k4bbvsxV/r9uUk68N4WIOpQHFCwCfeFo+
xBq3BYTITSoxZJ/xGIgAiL8=
=OaGc
-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] Re: Zeo

2005-04-27 Thread ken wood
Bakhtiar A Hamid wrote:
On 4/27/05, ken wood <[EMAIL PROTECTED]> wrote:
 

I've searched most site that have info on ZEO but have not been able to 
find answers to my questions on install for ZEO.
Maybe someone on the list can help.

I am running Zope 2.7 (with Plone site) on a Win'03 Server.
I would like to run ZEO Server and Client on a Linux Server.  The Linux 
Server also runs Zope 2.7 with a Plone site. Python version are 2.3.3.
Is this a workable configuration ?
Ultimate goal is to do away with the Win32 Server (at least for Zope).

I have noticed that most documentation on ZEO is a bit dated (2003). 
Where can I get newer documentation or HowTo on ZEO?
Thnaks in advance,
ken wood

   

this is how i've upgraded all these while
http://myzope.kedai.com.my/Members/kedai/News_Item.2003-11-15.5611/view
 

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

   

 

Hey guys,
I appreciate all the great tips on the cionfiguration issue. But my main 
issue is about infrastructure:
Which hardware and / or operating systems can be used for a Zope/Zeo 
system.
In particular, can I run a Zope instance on my Win32 server and have a 
Zeo Server/Clients on my Linux server?
If I use all the same versions (Python, Zope and Plone and Products) can 
I use a multi-OS infratructure?
Thanks,
ken wood
___
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 )