Re: [Zope3-Users] Variables in reStructuredText

2007-03-06 Thread Klaus Bremer

Just as an idea: use the python string modul for substitution.
Write in ReST:

.. figure:: path/to/image

   $title

   or

   ${caption}

and in your python code:

theTitle = myPhoto.getTitle()
theCaption = myPhoto.getCaption()
theText = GetTheRestructuredTextFromMyData(...)
theText = string.Template(theText).safe_substitute(theTitle, theCaption)

Regards
Klaus


Ursprüngliche Nachricht
am: Wed, 7 Mar 2007 09:00:04 +0400
von: Yann VOTE : [EMAIL PROTECTED]

>Hello,
>
>Is there a way to access attributes from a reStructuredText-rendered
>widget ?
>
>More precisely:
>
>I have a IPhoto schema which extend IImage. The fields are 'contentType'
>and 'data' from IImage, and 'title' and 'caption' which are specific to
>IPhoto. These last two fields are effectively used elsewhere in the
>application, in some page template.
>
>But now I want to show an image wraped into some reStructuredText,
>together with its title and caption. Something like the following in a
>text widget:
>
>.. figure:: path/to/image
>
>   title
>
>   caption
>
>But I can't find out how to access the title and caption attributes. Is
>this possible ? Is there another way to achieve this ?
>
>Thanks,
>
>Yann
>
>   
>
>   
>   
>___
>Yahoo! Mail r?invente le mail ! D?couvrez le nouveau Yahoo! Mail et son
>interface r?volutionnaire.
>http://fr.mail.yahoo.com
>___
>Zope3-users mailing list
>Zope3-users@zope.org
>http://mail.zope.org/mailman/listinfo/zope3-users
>


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


Re: [Zope3-Users] Re: I fold. What are ++etc++ and ++resource++ etc?

2006-06-12 Thread Klaus Bremer

Ursprüngliche Nachricht
am: Mon, 12 Jun 2006 20:53:32 +0200
von: Philipp von Weitershausen : [EMAIL PROTECTED]

>If you can't
>manage to spell "@" over the phone, then good luck spelling your email
>address.


It's a long time ago, but I remember a situation at school where we were
learning to solve equations with variables like

3x + 4 = 10

This is not to hard, but when it came to

3n + 4 = 10

someone said: "hey, I know how to handle it with 'x' but don't know what
to do with 'n'".

Everybody knows that '@' is part of an email-address, but by using '@'
in URL's you may run into problems in real life ... :)


Regards,
Klaus





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


Re: [Zope3-Users] Security between Context and View

2006-05-13 Thread Klaus Bremer

You can try to bypass the zope security mechanism by using
'removeSecurityProxy':


from zope.security.proxy import removeSecurityProxy

...
def doTransaction(self):
transaction = removeSecurityProxy(self.context.produceTransaction())
...


hth
-klaus



Ursprüngliche Nachricht
am: Fri, 12 May 2006 10:14:29 -0500
von: David Johnson : [EMAIL PROTECTED]

>I have a view object which calls it's content object to return another
>object.  The view object does not have access to the returned object, and I
>receive a forbidden attribute error.
>
>
>
>***Content***
>
>
>
>class Transaction(object):
>
>
>
>  transid=u''
>
>
>
>class TransactionFactory(Persistent,Contained):
>
>
>
> implements(ITransactionFactory)
>
>
>
> def produceTransaction(self):
>
>  transaction = Transaction()
>
>  transaction.transid = 'abcd'
>
>  return transaction
>
>
>
>***View***
>
>
>
>class Transaction:
>
>
>
>  def doTransaction(self):
>
>   transaction = self.context.produceTransaction()
>
>   self.session['transid'] = transaction.transid
>
>   transaction.commit()
>
>
>
>This generates a forbidden attribute error on
>transaction.Transaction.transid
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>--
>
>David Johnson
>
>
>
>___
>Zope3-users mailing list
>Zope3-users@zope.org
>http://mail.zope.org/mailman/listinfo/zope3-users


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


Re: [Zope3-Users] A Question about the "Hostname" in the Zope3 Server

2006-05-09 Thread Klaus Bremer

Well, I don't do Windows, but from clients at the local network you can
access zope by using the IP- and the port-number of the zope server (in
this example 192.168.1.8):

http://192.168.1.8:8080

regards
-klaus


Ursprüngliche Nachricht
am: Tue, 9 May 2006 08:33:15 -0500
von: Helman R. Valencia B. : [EMAIL PROTECTED]

>I'm a Colombian user that don't speak English, but I tray to explain the
>situation:
>
>
>
>I was developed some little exercises in Zope 2.7.5 and now in Zope
>3.2.0 for windows.
>
>
>
>When I Start a Zope 2.7.5, the Hostname is the same of my computer, and
>when I Start a Zope 3.2.0 the Hostname is "localhost" (reserved word).
>Is possible to change that name in Zope 3.2.0? because in the Intranet I
>can't access the Zope server from other computers using Zope 3.2.0.
>
>
>
>Thanks for your help.
>___
>Zope3-users mailing list
>Zope3-users@zope.org
>http://mail.zope.org/mailman/listinfo/zope3-users


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


[Zope3-Users] Workaround: file upload limit using zope behind apache

2006-05-04 Thread Klaus Bremer

Ursprüngliche Nachricht
am: Thu, 4 May 2006 13:31:00 +0200
von: Max M : [EMAIL PROTECTED]

>I have seen this problem before if the browser is using a proxy. That
>can limit the upload size too.


Good to know. In my case it's the apache mod_proxy module which caused
the trouble. I found the following workaround:

zope is running behind apache and there are three RewriteRule lines:


 ...
RewriteRule ^/static/(.*) - [L]
RewriteRule ^(/?.*)/uploadForm http://my.domain.name:6502/localpath$1/
uploadForm [L]
RewriteRule ^(/?.*) http://localhost:6502/localpath/++vh++http:%
{SERVER_NAME}:80/++/$1 [P,L]


The first one is for static sources like css-files (I do it this way)
The third one is for the reverse proxy to zope
and the second one is the new one mapping to a view named "uploadForm"
from wich large files should be uploaded.

The second rewrite rule does not force apache to serve as a proxy, so
uploads from this form are not limited in size.

But there are two drawbacks:

You have to modify the 'uploadForm'-template so that links point back
according to the first and third rewrite rules (wich can be tricky) and,
of course, you have to open the port zope is listening to the public.

Avoiding the latter is one important argument to use apache, so I hope
the proxy bug will be fixed in the near future.

regards
-klaus



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


Re(2): [Zope3-Users] file upload limit using zope behind apache

2006-05-04 Thread Klaus Bremer

Hi Jachin,

thank you for your response.

You are right, it's always a good idea to look at the logfiles ... which
reports:

proxy: error reading status line from remote server localhost, referer:
http:// ...
proxy: Error reading from remote server returned by ... , referer: http:// ...

As far as I have read up on this, it could be the apache bug 37770
(mod_proxy).
Until now I didn't found a workaround.

-klaus



Ursprüngliche Nachricht
am: Wed, 3 May 2006 14:55:19 -0500
von: Jachin Rupe : [EMAIL PROTECTED]

>hi there
>
>Since it works when zope is not behind apache the problem is probably
>with Apache.  Maybe the error logs will provide some clue.  You could
>try looking in your apache error logs.
>The error logs for Apache on OS X are in this directory:
>
>/var/log/httpd
>
>One of my favorite tricks in cases like this to open a terminal and
>run one of these:
>
>tail -f /var/log/httpd/error_log
>
>Then recreate the error (i.e upload a file larger than 70k), and if
>there are errors you'll see the error pop up in the terminal.
>
>Let me know what you find out, I'm working on an zope app that will
>eventually require file uploads that I want to put behind apache and
>any tricks to make that work right would be good to know.
>
>-jachin
>
>On May 3, 2006, at 11:54 AM, Klaus Bremer wrote:
>
>>
>> Hello,
>>
>> I'm running zope 3.2.0 behind apache 2.0.54 (on Mac OS X 10.4.5) and
>> can't upload files larger than aproximatly 70k using forms into
>> zope. By
>> accessing zope direct it works.
>>
>> The apache directive LimitRequestBody seems to have no effect.
>>
>> Does anybody know where to look next?
>>
>> Best regards
>> -klaus
>>
>>
>>
>>
>> ___
>> Zope3-users mailing list
>> Zope3-users@zope.org
>> http://mail.zope.org/mailman/listinfo/zope3-users
>
>


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


[Zope3-Users] file upload limit using zope behind apache

2006-05-03 Thread Klaus Bremer

Hello,

I'm running zope 3.2.0 behind apache 2.0.54 (on Mac OS X 10.4.5) and
can't upload files larger than aproximatly 70k using forms into zope. By
accessing zope direct it works. 

The apache directive LimitRequestBody seems to have no effect.

Does anybody know where to look next?

Best regards
-klaus




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


Re: [Zope3-Users] Re: Please Guido, pick me, pick me!

2006-02-03 Thread Klaus Bremer

Ursprüngliche Nachricht
Fri, 3 Feb 2006 12:42:13 +
von: Martin Aspeli
[EMAIL PROTECTED]

>with an appropriate branding (e.g. a logo derived from the Zope logo
and a new
>website to drum up excitement and get people started quickly). Both the
"Zope"
>and "3" parts should stay in the picture. There may have been a time for
>renaming (or maybe not)
...

That's marketing. In my opinion it's not a good idea to rename zope,
never underestimate the value of a brand name. Giving zope 3 an own
website has the problem that some www.zope3.tlds are already owned by others.

Why not giving Zope 3 a prominent place at the zope.org entry page? The
easiest way to start is at a well known place. Just promote Zope 3 at
www.zope.org and do not hide it there.

-Klaus



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