[Zope] Passing "error" variable to another page template?
Jason Leach
jason.leach at gmail.com
Mon Oct 25 11:15:32 EDT 2004
You can put it in 'options'. If you were in a PythonScropt you could:
container.myZPT(some_error='Warning. Bla bla')
Then in the ZPT:
<span tal:content="options/some_error"></span>
On Sat, 23 Oct 2004 12:00:04 -0400 (EDT), zope-request at zope.org
<zope-request at zope.org> wrote:
> Send Zope mailing list submissions to
> zope at zope.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.zope.org/mailman/listinfo/zope
> or, via email, send a message with subject or body 'help' to
> zope-request at zope.org
>
> You can reach the person managing the list at
> zope-owner at zope.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Zope digest..."
>
> Today's Topics:
>
> 1. Re: Use of APE in a production environment? (Brad Clements)
> 2. Passing "error" variable to another page template? (Kirk Strauser)
> 3. RE: adding properties trough pythonscript (Dieter Maurer)
> 4. RE: adding properties trough pythonscript (Sean Hastings)
> 5. nasty problem with tinytableplus (Dominique Lederer)
> 6. Re: [ZWeb] Web Services and Zope (Ausum Studio)
> 7. ZODB scalability in in large Zope deployments (Jeff Rodriguez)
> 8. can't find sqlexpr (Groszer Adam)
> 9. security settings: copy or move for anonymous (Kai Bielenberg)
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 22 Oct 2004 13:42:29 -0400
> From: "Brad Clements" <bkc at murkworks.com>
> Subject: Re: [Zope] Use of APE in a production environment?
> To: zope at zope.org
> Message-ID: <41790E44.6416.24D7D1D7 at coal.murkworks.com>
> Content-Type: text/plain; charset=US-ASCII
>
> On 22 Oct 2004 at 9:02, Kelly McDonald wrote:
>
> > 1. Is anyone using this setup in a production environment -
>
> I am using it for a client. Doing development on one machine and then deploying on another,
> via subversion checkouts.
>
> > have there been
> > any problems with stability or performance?
>
> I spent 2 hours this week trying to figure out why, on one machine it (Ape-1.0) worked fine,
> and on the other it died with an assertion error. Yet the directory contents were identical, the
> python version the same, all the configs the same.
>
> I eventually figured out how to solve the problem by putting an explicit
> mapper_name=python_script in many "effected" .xyz..properties files.
>
> Though, figuring out which one was causing the problem was darn tough!
>
> Otherwise it works fine. I don't have any opinion on performance though.
>
> >
> > 2. Has anyone figured anything out to populate the cache upon startup?
>
> Isn't that a generic ZODB question, not really specific to Ape.. ?
>
> > 3. What has been the performance hit, if any?
>
> I imagine the loading process is slightly slower than traditional ZODB, but I have not
> measured it. In our case, we're using it on a site that's all XML and XSLT generation, so
> there aren't more than 100 or so objects in Ape storage anyway.
>
> >
> > 4. have you had any problems using subversion/cvs with the objects on
> > the APE/Filesystem volume, especially when using multiple branches for
> > development?
>
> No problems.
>
> --
> Brad Clements, bkc at murkworks.com (315)268-1000
> http://www.murkworks.com (315)268-9812 Fax
> http://www.wecanstopspam.org/ AOL-IM: BKClements
>
> ------------------------------
>
> Message: 2
> Date: Fri, 22 Oct 2004 12:51:02 -0500
> From: Kirk Strauser <kirk at daycos.com>
> Subject: [Zope] Passing "error" variable to another page template?
> To: zope at zope.org
> Message-ID: <200410221251.03053.kirk at daycos.com>
> Content-Type: text/plain; charset="us-ascii"
>
> I'd like to use a tal:on-error clause to render an error message that
> includes the contents of the "error" variable, and I'm at a loss as to how
> to go about that. I guess that a more general form of the question would
> be, how do I pass variables to page templates?
> --
> Kirk Strauser
> The Day Companies
>
> ------------------------------
>
> Message: 3
> Date: Fri, 22 Oct 2004 19:39:50 +0200
> From: Dieter Maurer <dieter at handshake.de>
> Subject: RE: [Zope] adding properties trough pythonscript
> To: "Sean Hastings" <whysean at softhome.net>
> Cc: zope list <zope at zope.org>
> Message-ID: <16761.17894.920506.176558 at gargle.gargle.HOWL>
> Content-Type: text/plain; charset=us-ascii
>
> Sean Hastings wrote at 2004-10-21 16:22 -0400:
> >Cool!
> >
> >I already have a whole bunch of code that uses this sort of error checking,
> >and I wanted to make sure that as long as I was careful to specify the
> >errors I am trapping that I don't have to rewrite it all.
>
> Hopefully, you observe that it does *NOT* depend on the type
> of errors you are trapping but whether or not you changed
> (in the try block) persistent state *before* the exception occured
> (in this block).
>
> --
> Dieter
>
> ------------------------------
>
> Message: 4
> Date: Fri, 22 Oct 2004 14:53:08 -0400
> From: "Sean Hastings" <whysean at softhome.net>
> Subject: RE: [Zope] adding properties trough pythonscript
> To: "Dieter Maurer" <dieter at handshake.de>
> Cc: zope list <zope at zope.org>
> Message-ID: <LOBBJCJJJBIOBEAFOIDCCEKGDOAA.whysean at softhome.net>
> Content-Type: text/plain; charset="US-ASCII"
>
> > Hopefully, you observe that it does *NOT* depend on the type
> > of errors you are trapping but whether or not you changed
> > (in the try block) persistent state *before* the exception occurred
> > (in this block).
>
> I do not yet understanding that part. My second example was:
>
> 1 def fooEdit(self,REQUEST):
> 2 "foo is a string - foo2 is an int"
> 3 try:
> 4 self.foo = REQUEST.get('foo','')
> 5 self.foo2 = int(REQUEST.get('foo2',0)
> 6 except ValueError, e:
> 7 self.foo2 = 0
>
> Here I am modifying the persistent object's "foo" property in line 4, then
> trapping an exception that the "int" function could raise in line 5. Unless
> line 4 can also raise a ValueError (and I don't think it can), why am I not
> safe in assuming one of these three cases?
>
> A. A ValueError raised in line 5 will leave "foo" set properly from the
> REQUEST, while "foo2" gets set to 0.
>
> B. Some other Exception raised in line 4 or 5 will cause Zope to roll back
> the transaction and no properties are changed on this try.
>
> C. No Exceptions occur, and leave both properties are set correctly from
> the REQUEST.
>
> --Sean
>
> > -----Original Message-----
> > From: Dieter Maurer [mailto:dieter at handshake.de]
> > Sent: Friday, October 22, 2004 1:40 PM
> > To: Sean Hastings
> > Cc: massimop at users.berlios.de; zope list
> > Subject: RE: [Zope] adding properties trough pythonscript
> >
> >
> > Sean Hastings wrote at 2004-10-21 16:22 -0400:
> > >Cool!
> > >
> > >I already have a whole bunch of code that uses this sort of
> > error checking,
> > >and I wanted to make sure that as long as I was careful to specify the
> > >errors I am trapping that I don't have to rewrite it all.
> >
> >
> > --
> > Dieter
>
> ------------------------------
>
> Message: 5
> Date: Fri, 22 Oct 2004 20:56:04 +0200
> From: "Dominique Lederer" <lederer at dmc01.at>
> Subject: [Zope] nasty problem with tinytableplus
> To: zope at zope.org
> Message-ID: <opsgab7qcgxst1e0 at haktom.office.dmc.at>
> Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8
>
> hi!
>
> i want to use the tinytable function "setRow" within a python script.
>
> "setRow" has the following syntax
> setRow('value1','value2,'value3')
> or
> setRow(column1='value1', column2='value2, column3='value3')
>
> that worked for me (if i write the arguments myself)
> but i want to pass the arguments dynamically
>
> so i coded the following:
>
> newRow=""
> for field in something:
> newRow += "%s," % field.value() #create string with the form "value1,
> value2, value3"
> context.mytinytable.setRow(newRow)
>
> but i get the following error message:
> Error Value: list objects are unhashable
>
> i also tried to pass the arguments with dicts, arrays, etc it won´t work...
>
> please help, what to i have to do to pass dynamically created arguments to
> this function.
>
> tnx in advance
> HakTom
>
> ------------------------------
>
> Message: 6
> Date: Fri, 22 Oct 2004 14:47:32 -0500
> From: "Ausum Studio" <ausum_studio at hotmail.com>
> Subject: [Zope] Re: [ZWeb] Web Services and Zope
> To: Paulo S?rgio <psm041 at ig.com.br>, <zope at zope.org>
> Message-ID: <BAY9-DAV295euwdUTaG00002312 at hotmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Please in the future use the Zope list:
> http://mail.zope.org/mailman/listinfo/zope
>
> There isn't at this very moment a web services platform for Zope.
> Nonetheless you might start by installing the SOAPMethod product.
>
> Ausum
>
> ----- Original Message -----
> From: "Paulo Sérgio" <psm041 at ig.com.br>
> To: <zope-web at zope.org>
> Sent: Friday, October 22, 2004 10:52 AM
> Subject: [ZWeb] Web Services and Zope
>
> > Hi all,
> >
> > Anyone know where i can find some documentation on Web
> > Services/WSDL/XML/Zope?
> > I have to use web services in a Zope application, but i can't find
> > any documentation on it... :-(
> >
> > Thanks in advance,
> > Paulo Sérgio.
> >
> > >
> > _______________________________________________
> > Zope-web maillist - Zope-web at zope.org
> > http://mail.zope.org/mailman/listinfo/zope-web
> >
>
> ------------------------------
>
> Message: 7
> Date: Fri, 22 Oct 2004 23:37:59 -0700
> From: Jeff Rodriguez <zope-users at gurugeek.com>
> Subject: [Zope] ZODB scalability in in large Zope deployments
> To: zope at zope.org
> Message-ID: <4179FC47.2070808 at gurugeek.com>
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
> I'm planning on using Plone and Zope for our company intranet. If
> there's one thing I've learned working at my company it's that we will
> push whatever the product is to it's absolute limit and then ask for more.
>
> Which makes me wonder, how does ZODB scale in massive deployments? I'm
> not really concerned with the number of hits so much as ZODB's ability
> to handle:
> 1. Large quantities of large objects
> 2. Small quantities of very large objects.
> 3. Large quantities of small objects.
>
> I can really forsee millions of objects with sizes ranging from a couple
> kilobytes to hundreds of megabytes. Anyone with experience in this type
> of setting please let me know as I am very interested in the
> difficulties, compromises, or praise you have for/with ZODB/ZOPE/Plone.
>
> Thank you,
> Jeff Rodriguez
>
> ------------------------------
>
> Message: 8
> Date: Sat, 23 Oct 2004 11:59:37 +0200
> From: Groszer Adam <adi at fbi.hu>
> Subject: [Zope] can't find sqlexpr
> To: zope at zope.org
> Message-ID: <1469368638.20041023115937 at fbi.hu>
> Content-Type: text/plain; charset=us-ascii
>
> Please advise me kindly where can I get the sqlexpr product for Zope3
>
> --
> Best regards,
> Groszer Adam
>
> ------------------------------
>
> Message: 9
> Date: Sat, 23 Oct 2004 16:29:38 +0200
> From: Kai Bielenberg <kaib at informatik.uni-bremen.de>
> Subject: [Zope] security settings: copy or move for anonymous
> To: zope at zope.org
> Message-ID: <cldpu3$p2q$1 at sea.gmane.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi,
>
> I've just seen that in my Zope 2.7.2 installation Copy or move
> permissions are granted to anonymous users by default in the zope
> security settings. Why that?
>
> Kai
>
> ------------------------------
>
> _______________________________________________
> Zope maillist - Zope at zope.org
>
> End of Zope Digest, Vol 5, Issue 28
> ***********************************
>
More information about the Zope
mailing list