Re: [Zope] Order of method calls of ZopePageTemplate

2009-03-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Analog Kid wrote:
> hi andreas:
> 
> the reason i need to do it this way is that no page template must be
> modified ... so i cant call a py script from the template.
> 
> regards,
> AK
> 
> On Wed, Mar 11, 2009 at 1:56 PM, Andreas Jung  wrote:
> 
> This approach is broken by design-by-design. If you want to depend on
> the execution order: move the related code into a Python script and call
> the script from within the template.
> 
> -aj
> 
> On 11.03.2009 9:18 Uhr, Analog Kid wrote:
 i want to make sure that a certain method gets called before anything
 else when the template gets rendered. so if i know about the order in
 which page template methods get called, i can patch one (the first in
 the order).

Which "methods" are you referring to?  The actual methods of the
template objects themselves?  If so, look at
Shared/DC/Scripts/Bindings.py (the Bindings base class defines __call__).


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJt8kW+gerLs4ltQ4RAsONAJ4gNgmGAmAtqerpSSnZUnIenNNWpwCfbTnc
eySp6Uz1LiNRrzTzIWyrKrQ=
=yWN2
-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] redirect timeout doesn't work

2009-03-11 Thread Dvir Bar-lev
Hi just wanted to add something that I forgot to meantion.
The problem I described only happenes on  IE, on firefox it does the redirect 
even after I refresh the page manually

-Original Message-
From: zope-boun...@zope.org [mailto:zope-boun...@zope.org] On Behalf Of Dvir 
Bar-lev
Sent: Wednesday, March 11, 2009 3:47 PM
To: zope@zope.org
Subject: Re: [Zope] redirect timeout doesn't work

Yep, you were right, the syntax I used was bad, but now I encountered a 
diffrent problem.
If i set the header as you said and manually refresh the page than it wont 
redirect again.
Anyone encountered this before? Can't find anything on the web about this 
problem

-Original Message-
From: Thierry Florac [mailto:thierry.flo...@onf.fr] 
Sent: Wednesday, March 11, 2009 3:24 PM
To: Dvir Bar-lev
Cc: zope@zope.org
Subject: Re: [Zope] redirect timeout doesn't work

Le mercredi 11 mars 2009 à 14:59 +0200, Dvir Bar-lev a écrit :
> I want to redirect a user from my page to another page after a certain
> time, I put this code in the dtml  page at the top I want to redirect
> from:
> 
>  
> 
>  Address’)">

Maybe I'm wrong but I think it should be something like :

  setHeader('Refresh', '5;URL=http://...')


  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.flo...@onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
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] redirect timeout doesn't work

2009-03-11 Thread Dvir Bar-lev
Yep, you were right, the syntax I used was bad, but now I encountered a 
diffrent problem.
If i set the header as you said and manually refresh the page than it wont 
redirect again.
Anyone encountered this before? Can't find anything on the web about this 
problem

-Original Message-
From: Thierry Florac [mailto:thierry.flo...@onf.fr] 
Sent: Wednesday, March 11, 2009 3:24 PM
To: Dvir Bar-lev
Cc: zope@zope.org
Subject: Re: [Zope] redirect timeout doesn't work

Le mercredi 11 mars 2009 à 14:59 +0200, Dvir Bar-lev a écrit :
> I want to redirect a user from my page to another page after a certain
> time, I put this code in the dtml  page at the top I want to redirect
> from:
> 
>  
> 
>  Address’)">

Maybe I'm wrong but I think it should be something like :

  setHeader('Refresh', '5;URL=http://...')


  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.flo...@onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
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] redirect timeout doesn't work

2009-03-11 Thread Thierry Florac
Le mercredi 11 mars 2009 à 14:59 +0200, Dvir Bar-lev a écrit :
> I want to redirect a user from my page to another page after a certain
> time, I put this code in the dtml  page at the top I want to redirect
> from:
> 
>  
> 
>  Address’)">

Maybe I'm wrong but I think it should be something like :

  setHeader('Refresh', '5;URL=http://...')


  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.flo...@onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
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] redirect timeout doesn't work

2009-03-11 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11.03.2009 13:59 Uhr, Dvir Bar-lev wrote:
> Hi
> 
>  
> 
> I want to redirect a user from my page to another page after a certain
> time, I put this code in the dtml  page at the top I want to redirect from:
> 
>  
> 
> 

Likely improper syntax. The correct syntax for the Refresh header is

Refresh: 5; url=http://foo.com

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkm3unIACgkQCJIWIbr9KYxzVgCg0qp4wPDCQygnDCv4aUQlqNKG
QxcAoKgZndhxhKPfyYhTOb82nRWPZR08
=L8/u
-END PGP SIGNATURE-
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:i...@zopyx.com
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
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] redirect timeout doesn't work

2009-03-11 Thread Dvir Bar-lev
Hi

 

I want to redirect a user from my page to another page after a certain
time, I put this code in the dtml  page at the top I want to redirect
from:

 



 

But although it does refresh after the timeout it stays in the same page
instead of going to the address listed in URLAddress.

Anyone knows what I did wrong? Or I even did it the right way?

___
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] session data object question

2009-03-11 Thread Andrew Milton
+---[ Lennart Regebro ]--
| On Wed, Mar 11, 2009 at 09:32, Dvir Bar-lev  wrote:
| > What I need is a way to know if we loaded the page as a result of
| > pressing the button or as a result of refreshing the page, as I need to
| > do different things in each case.
| 
| There is no difference between a refresh and a normal page load.

Unless you refresh after the form submit :-)

Of course if the broken design posted to a handler script instead of to
itself, a lot of problems could be side-stepped :-)

-- 
Andrew Milton
a...@theinternet.com.au
___
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] session data object question

2009-03-11 Thread Lennart Regebro
On Wed, Mar 11, 2009 at 09:32, Dvir Bar-lev  wrote:
> What I need is a way to know if we loaded the page as a result of
> pressing the button or as a result of refreshing the page, as I need to
> do different things in each case.

There is no difference between a refresh and a normal page load.

-- 
Lennart Regebro: Pythonista, Barista, Notsotrista.
http://regebro.wordpress.com/
+33 661 58 14 64
___
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] session data object question

2009-03-11 Thread Dvir Bar-lev
Yep I refresh after, I'll try to work with cookies than, tx

-Original Message-
From: Andrew Milton [mailto:a...@theinternet.com.au] 
Sent: Wednesday, March 11, 2009 11:13 AM
To: Dvir Bar-lev
Cc: zope@zope.org
Subject: Re: [Zope] session data object question

+---[ Dvir Bar-lev ]--
| Hi
| 
| I have a button like that but the the problem is that it also has this
| value if I refresh the page, what I mean Is this, I put in the
logged_in
| page:

That is highly unlikely, unless you are refreshing AFTER you submit the
form, in which case you are essentially re-submitting the form.

I would suggest setting a cookie with a timestamp.

-- 
Andrew Milton
a...@theinternet.com.au
___
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] session data object question

2009-03-11 Thread Andrew Milton
+---[ Dvir Bar-lev ]--
| Hi
| 
| I have a button like that but the the problem is that it also has this
| value if I refresh the page, what I mean Is this, I put in the logged_in
| page:

That is highly unlikely, unless you are refreshing AFTER you submit the
form, in which case you are essentially re-submitting the form.

I would suggest setting a cookie with a timestamp.

-- 
Andrew Milton
a...@theinternet.com.au
___
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] session data object question

2009-03-11 Thread Dvir Bar-lev
I also tried to change the value of theButton key like so:

 
  

   
   

But if refresh the button it still thinks it has the value Login instead
of the value LoggedIn :(

-Original Message-
From: zope-boun...@zope.org [mailto:zope-boun...@zope.org] On Behalf Of
Dvir Bar-lev
Sent: Wednesday, March 11, 2009 10:33 AM
To: zope@zope.org
Subject: Re: [Zope] session data object question

Hi

I have a button like that but the the problem is that it also has this
value if I refresh the page, what I mean Is this, I put in the logged_in
page:


Do something


And it has the key even if I refresh the page.

I also tried to put  to see if it keeps this value
after we refresh the page and it does.
What I need is a way to know if we loaded the page as a result of
pressing the button or as a result of refreshing the page, as I need to
do different things in each case.

-Original Message-
From: Andrew Milton [mailto:a...@theinternet.com.au] 
Sent: Wednesday, March 11, 2009 10:15 AM
To: Dvir Bar-lev
Cc: zope@zope.org
Subject: Re: [Zope] session data object question

+---[ Dvir Bar-lev ]--
| Hi
| 
|  
| 
| I was wondering if there is a way to connect the creation of a session
object
| to a button push.
| 
| I?ll explain in more detail:
| 
|  
| 
| I have a log in from called login_form, and I have a dtml method
called
| looged_in that is called when we push the submit button in the log in
form.
| 
| What I did is the following, in the log_in_form I get a session data
object
| only if it exsists and I check how much time passed and act
accordingly, in the
| looged_in method I create the data session oblject ans set the start
time.
| 
| Unfortuantly that is not good for me because if a user refreshes the
page it
| resets the time in the session object, I was wondering if there is a
way for me
| to know if I can reset the session data time only when the user clicks
the
| submit button and not as a result of a refresh call.

Name the submit button and check for the name of the button in the
request.



"theButton" will appear in REQUEST (and REQUEST.form) if the button was
pressed.


-- 
Andrew Milton
a...@theinternet.com.au
___
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] Order of method calls of ZopePageTemplate

2009-03-11 Thread Analog Kid
hi andreas:

the reason i need to do it this way is that no page template must be
modified ... so i cant call a py script from the template.

regards,
AK

On Wed, Mar 11, 2009 at 1:56 PM, Andreas Jung  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> This approach is broken by design-by-design. If you want to depend on
> the execution order: move the related code into a Python script and call
> the script from within the template.
>
> - -aj
>
> On 11.03.2009 9:18 Uhr, Analog Kid wrote:
> > i want to make sure that a certain method gets called before anything
> > else when the template gets rendered. so if i know about the order in
> > which page template methods get called, i can patch one (the first in
> > the order).
> >
> > thanks,
> > AK
> >
> > On Wed, Mar 11, 2009 at 1:28 PM, Andreas Jung  > > wrote:
> >
> > Where and why is this relevant?
> >
> > -aj
> >
> > On Wed, Mar 11, 2009 at 08:54, Analog Kid  > > wrote:
> > > sry about that ... what i mean is i need to know the order of
> > methods when a
> > > page is rendered (on server) ...
> > >
> > > regards,
> > > AK
> > >
> > > On Wed, Mar 11, 2009 at 1:02 PM, Andreas Jung  > > wrote:
> > >>
> > On 11.03.2009 6:22 Uhr, Analog Kid wrote:
> >> Hi All:
> >
> >> I need to know the order of method calls inside ZopePageTemplate.py
> >> whenever a form from the PT is submitted or even when the PT is
> >> rendered. Can anyone shed some light on this please?
> >
> >
> > This question makes no sense. Template rendering (generation of HTML)
> > occurs on the *server*, form submission on the *browser*.
> >
> > -aj
> > >
> > >
>
> - --
> ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
> Web: www.zopyx.com - Email: i...@zopyx.com - Phone +49 - 7071 - 793376
> Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
> Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
> - 
> E-Publishing, Python, Zope & Plone development, Consulting
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkm3dZgACgkQCJIWIbr9KYxr+wCffbKYES6t8aS8Fd+eV4So0BN7
> zRYAoKh3jdY1eE9nRw4o4VRbgkDd6xnD
> =8qjv
> -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] session data object question

2009-03-11 Thread Dvir Bar-lev
Hi

I have a button like that but the the problem is that it also has this
value if I refresh the page, what I mean Is this, I put in the logged_in
page:


Do something


And it has the key even if I refresh the page.

I also tried to put  to see if it keeps this value
after we refresh the page and it does.
What I need is a way to know if we loaded the page as a result of
pressing the button or as a result of refreshing the page, as I need to
do different things in each case.

-Original Message-
From: Andrew Milton [mailto:a...@theinternet.com.au] 
Sent: Wednesday, March 11, 2009 10:15 AM
To: Dvir Bar-lev
Cc: zope@zope.org
Subject: Re: [Zope] session data object question

+---[ Dvir Bar-lev ]--
| Hi
| 
|  
| 
| I was wondering if there is a way to connect the creation of a session
object
| to a button push.
| 
| I?ll explain in more detail:
| 
|  
| 
| I have a log in from called login_form, and I have a dtml method
called
| looged_in that is called when we push the submit button in the log in
form.
| 
| What I did is the following, in the log_in_form I get a session data
object
| only if it exsists and I check how much time passed and act
accordingly, in the
| looged_in method I create the data session oblject ans set the start
time.
| 
| Unfortuantly that is not good for me because if a user refreshes the
page it
| resets the time in the session object, I was wondering if there is a
way for me
| to know if I can reset the session data time only when the user clicks
the
| submit button and not as a result of a refresh call.

Name the submit button and check for the name of the button in the
request.



"theButton" will appear in REQUEST (and REQUEST.form) if the button was
pressed.


-- 
Andrew Milton
a...@theinternet.com.au
___
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] Order of method calls of ZopePageTemplate

2009-03-11 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This approach is broken by design-by-design. If you want to depend on
the execution order: move the related code into a Python script and call
the script from within the template.

- -aj

On 11.03.2009 9:18 Uhr, Analog Kid wrote:
> i want to make sure that a certain method gets called before anything
> else when the template gets rendered. so if i know about the order in
> which page template methods get called, i can patch one (the first in
> the order).
> 
> thanks,
> AK
> 
> On Wed, Mar 11, 2009 at 1:28 PM, Andreas Jung  > wrote:
> 
> Where and why is this relevant?
> 
> -aj
> 
> On Wed, Mar 11, 2009 at 08:54, Analog Kid  > wrote:
> > sry about that ... what i mean is i need to know the order of
> methods when a
> > page is rendered (on server) ...
> >
> > regards,
> > AK
> >
> > On Wed, Mar 11, 2009 at 1:02 PM, Andreas Jung  > wrote:
> >>
> On 11.03.2009 6:22 Uhr, Analog Kid wrote:
>> Hi All:
> 
>> I need to know the order of method calls inside ZopePageTemplate.py
>> whenever a form from the PT is submitted or even when the PT is
>> rendered. Can anyone shed some light on this please?
> 
> 
> This question makes no sense. Template rendering (generation of HTML)
> occurs on the *server*, form submission on the *browser*.
> 
> -aj
> >
> >

- -- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: i...@zopyx.com - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
- 
E-Publishing, Python, Zope & Plone development, Consulting

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkm3dZgACgkQCJIWIbr9KYxr+wCffbKYES6t8aS8Fd+eV4So0BN7
zRYAoKh3jdY1eE9nRw4o4VRbgkDd6xnD
=8qjv
-END PGP SIGNATURE-
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:i...@zopyx.com
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
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] Order of method calls of ZopePageTemplate

2009-03-11 Thread Analog Kid
i want to make sure that a certain method gets called before anything else
when the template gets rendered. so if i know about the order in which page
template methods get called, i can patch one (the first in the order).

thanks,
AK

On Wed, Mar 11, 2009 at 1:28 PM, Andreas Jung  wrote:

> Where and why is this relevant?
>
> -aj
>
> On Wed, Mar 11, 2009 at 08:54, Analog Kid  wrote:
> > sry about that ... what i mean is i need to know the order of methods
> when a
> > page is rendered (on server) ...
> >
> > regards,
> > AK
> >
> > On Wed, Mar 11, 2009 at 1:02 PM, Andreas Jung  wrote:
> >>
> >> -BEGIN PGP SIGNED MESSAGE-
> >> Hash: SHA1
> >>
> >> On 11.03.2009 6:22 Uhr, Analog Kid wrote:
> >> > Hi All:
> >> >
> >> > I need to know the order of method calls inside ZopePageTemplate.py
> >> > whenever a form from the PT is submitted or even when the PT is
> >> > rendered. Can anyone shed some light on this please?
> >> >
> >>
> >> This question makes no sense. Template rendering (generation of HTML)
> >> occurs on the *server*, form submission on the *browser*.
> >>
> >> - -aj
> >> -BEGIN PGP SIGNATURE-
> >> Version: GnuPG v1.4.9 (Darwin)
> >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> >>
> >> iEYEARECAAYFAkm3aQgACgkQCJIWIbr9KYycgwCggLVGY3qiql5Ltq3E28sbGosS
> >> d5wAoKdCwDH4NYYynsNmqemV5xDSZF7p
> >> =J5Jt
> >> -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] session data object question

2009-03-11 Thread Andrew Milton
+---[ Dvir Bar-lev ]--
| Hi
| 
|  
| 
| I was wondering if there is a way to connect the creation of a session object
| to a button push.
| 
| I?ll explain in more detail:
| 
|  
| 
| I have a log in from called login_form, and I have a dtml method called
| looged_in that is called when we push the submit button in the log in form.
| 
| What I did is the following, in the log_in_form I get a session data object
| only if it exsists and I check how much time passed and act accordingly, in 
the
| looged_in method I create the data session oblject ans set the start time.
| 
| Unfortuantly that is not good for me because if a user refreshes the page it
| resets the time in the session object, I was wondering if there is a way for 
me
| to know if I can reset the session data time only when the user clicks the
| submit button and not as a result of a refresh call.

Name the submit button and check for the name of the button in the request.



"theButton" will appear in REQUEST (and REQUEST.form) if the button was
pressed.


-- 
Andrew Milton
a...@theinternet.com.au
___
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] session data object question

2009-03-11 Thread Dvir Bar-lev
Hi 

 

I was wondering if there is a way to connect the creation of a session
object to a button push.

I'll explain in more detail:

 

I have a log in from called login_form, and I have a dtml method called
looged_in that is called when we push the submit button in the log in
form.

What I did is the following, in the log_in_form I get a session data
object only if it exsists and I check how much time passed and act
accordingly, in the looged_in method I create the data session oblject
ans set the start time.

Unfortuantly that is not good for me because if a user refreshes the
page it resets the time in the session object, I was wondering if there
is a way for me to know if I can reset the session data time only when
the user clicks the submit button and not as a result of a refresh call.

 

I tried looking on the web and in the zope book but I couldn't find
anything.

___
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] Order of method calls of ZopePageTemplate

2009-03-11 Thread Andreas Jung
Where and why is this relevant?

-aj

On Wed, Mar 11, 2009 at 08:54, Analog Kid  wrote:
> sry about that ... what i mean is i need to know the order of methods when a
> page is rendered (on server) ...
>
> regards,
> AK
>
> On Wed, Mar 11, 2009 at 1:02 PM, Andreas Jung  wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> On 11.03.2009 6:22 Uhr, Analog Kid wrote:
>> > Hi All:
>> >
>> > I need to know the order of method calls inside ZopePageTemplate.py
>> > whenever a form from the PT is submitted or even when the PT is
>> > rendered. Can anyone shed some light on this please?
>> >
>>
>> This question makes no sense. Template rendering (generation of HTML)
>> occurs on the *server*, form submission on the *browser*.
>>
>> - -aj
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.9 (Darwin)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAkm3aQgACgkQCJIWIbr9KYycgwCggLVGY3qiql5Ltq3E28sbGosS
>> d5wAoKdCwDH4NYYynsNmqemV5xDSZF7p
>> =J5Jt
>> -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] Order of method calls of ZopePageTemplate

2009-03-11 Thread Analog Kid
sry about that ... what i mean is i need to know the order of methods when a
page is rendered (on server) ...

regards,
AK

On Wed, Mar 11, 2009 at 1:02 PM, Andreas Jung  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 11.03.2009 6:22 Uhr, Analog Kid wrote:
> > Hi All:
> >
> > I need to know the order of method calls inside ZopePageTemplate.py
> > whenever a form from the PT is submitted or even when the PT is
> > rendered. Can anyone shed some light on this please?
> >
>
> This question makes no sense. Template rendering (generation of HTML)
> occurs on the *server*, form submission on the *browser*.
>
> - -aj
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkm3aQgACgkQCJIWIbr9KYycgwCggLVGY3qiql5Ltq3E28sbGosS
> d5wAoKdCwDH4NYYynsNmqemV5xDSZF7p
> =J5Jt
> -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] Order of method calls of ZopePageTemplate

2009-03-11 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11.03.2009 6:22 Uhr, Analog Kid wrote:
> Hi All:
> 
> I need to know the order of method calls inside ZopePageTemplate.py
> whenever a form from the PT is submitted or even when the PT is
> rendered. Can anyone shed some light on this please?
>

This question makes no sense. Template rendering (generation of HTML)
occurs on the *server*, form submission on the *browser*.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkm3aQgACgkQCJIWIbr9KYycgwCggLVGY3qiql5Ltq3E28sbGosS
d5wAoKdCwDH4NYYynsNmqemV5xDSZF7p
=J5Jt
-END PGP SIGNATURE-
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:i...@zopyx.com
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

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