Gerardo Herzig schrieb:
>
> @is_logued_in
> def change_pass():
>bla
>bla
>
> And so on for all the other functions who needs that the user is still
> loged in.
>
> where obviosly the is_logued_in() function will determine if the dude is
> still loged in, and THEN execute change_pass().
Gabriel Genellina wrote:
> En Wed, 29 Aug 2007 07:32:21 -0300, BJörn Lindqvist <[EMAIL PROTECTED]>
> escribi�:
>
>> On 8/24/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>>> En Thu, 23 Aug 2007 09:20:21 -0300, BJörn Lindqvist <[EMAIL PROTECTED]>
>>> escribi�:
>>>
def check_user_logged_in
En Wed, 29 Aug 2007 07:32:21 -0300, BJörn Lindqvist <[EMAIL PROTECTED]>
escribi�:
> On 8/24/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>> En Thu, 23 Aug 2007 09:20:21 -0300, BJörn Lindqvist <[EMAIL PROTECTED]>
>> escribi�:
>>
>> > def check_user_logged_in(func):
>> > def f(*args, **kwa
In message <[EMAIL PROTECTED]>, Gerardo
Herzig wrote:
> @is_logued_in
> def change_pass():
> bla
> bla
>
> And so on for all the other functions who needs that the user is still
> loged in.
My suspicion is that most of the methods in your session object (with the
obvious exception of the
On 8/24/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Thu, 23 Aug 2007 09:20:21 -0300, BJörn Lindqvist <[EMAIL PROTECTED]>
> escribi�:
>
> > def check_user_logged_in(func):
> > def f(*args, **kwargs):
> > if global_state.the_user.is_logged_in:
> > return func(*args,
En Thu, 23 Aug 2007 09:20:21 -0300, BJörn Lindqvist <[EMAIL PROTECTED]>
escribi�:
> On 8/22/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>> On 22 ago, 10:00, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote:
>> > As I said, you can accomplish the exact same thing by calling a
>> > function from w
BJörn Lindqvist wrote:
>On 8/22/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>
>
>>On 22 ago, 10:00, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote:
>>
>>
>>>As I said, you can accomplish the exact same thing by calling a
>>>function from within the function that requires the user to be log
On 8/22/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> On 22 ago, 10:00, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote:
> > As I said, you can accomplish the exact same thing by calling a
> > function from within the function that requires the user to be logged
> > in.
> >
> > def change_pass():
Gerardo Herzig a écrit :
> Steven Bethard wrote:
>
>> Gerardo Herzig wrote:
>>
>>
>>> Hi all. I guess i have a conceptual question:
>>> Im planing using a quite simple decorator to be used as a conditional
>>> for the execution of the function.
(snip)
>>>
>>> Something in my mind tells me that
On 22 ago, 10:00, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote:
> On 8/17/07, Gerardo Herzig <[EMAIL PROTECTED]> wrote:
>
> > BJörn Lindqvist wrote:
> > >def is_logued_in():
> > >if not user.is_logged_in():
> > >raise NotLoggedInError
>
> > >It costs you one more line, but reduces comple
On 8/17/07, Gerardo Herzig <[EMAIL PROTECTED]> wrote:
> BJörn Lindqvist wrote:
> >def is_logued_in():
> >if not user.is_logged_in():
> >raise NotLoggedInError
> >
> >It costs you one more line, but reduces complexity. And if you are
> >worried about that extra line you can put it in a f
Gerardo Herzig wrote:
[...]
> As far as i know (by the way, AFAK is the shortcut? [...]
That's "AFAIK", AFAIK :-)
regards
Steve
--
Steve Holden+1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
-
BJörn Lindqvist wrote:
>On 8/16/07, Gerardo Herzig <[EMAIL PROTECTED]> wrote:
>
>
>>@is_logued_in
>>def change_pass():
>>bla
>>bla
>>
>>And so on for all the other functions who needs that the user is still
>>loged in.
>>
>>where obviosly the is_logued_in() function will determine if the
Laszlo Nagy wrote:
>
>>>
>>> Are you developing a website or a GUI program?
>>>
>>>
>> It will be used in a web development. It is an important point?
>
> Yes, I think. Unless you use AJAX. :-) Most web sites work this way:
>
> user clicks -> request to server -> process on server -> response
>
>
On 8/16/07, Gerardo Herzig <[EMAIL PROTECTED]> wrote:
> @is_logued_in
> def change_pass():
> bla
> bla
>
> And so on for all the other functions who needs that the user is still
> loged in.
>
> where obviosly the is_logued_in() function will determine if the dude is
> still loged in, and TH
>>
>> Are you developing a website or a GUI program?
>>
>>
> It will be used in a web development. It is an important point?
Yes, I think. Unless you use AJAX. :-) Most web sites work this way:
user clicks -> request to server -> process on server -> response
I would rather enclose the whole han
Steven Bethard wrote:
>Gerardo Herzig wrote:
>
>
>>Hi all. I guess i have a conceptual question:
>>Im planing using a quite simple decorator to be used as a conditional
>>for the execution of the function. I mean something like that:
>>
>>@is_logued_in
>>def change_pass():
>> bla
>> bla
>>
Gerardo Herzig wrote:
> Hi all. I guess i have a conceptual question:
> Im planing using a quite simple decorator to be used as a conditional
> for the execution of the function. I mean something like that:
>
> @is_logued_in
> def change_pass():
>bla
>bla
>
> And so on for all the other
Gerardo Herzig wrote:
>> Hi all. I guess i have a conceptual question:
>> Im planing using a quite simple decorator to be used as a conditional
>> for the execution of the function. I mean something like that:
>>
>> @is_logued_in
>> def change_pass():
>> bla
>> bla
>>
>> And so on for all
Gerardo Herzig wrote:
> Hi all. I guess i have a conceptual question:
> Im planing using a quite simple decorator to be used as a conditional
> for the execution of the function. I mean something like that:
>
> @is_logued_in
> def change_pass():
> bla
> bla
>
> And so on for all the other
Hi all. I guess i have a conceptual question:
Im planing using a quite simple decorator to be used as a conditional
for the execution of the function. I mean something like that:
@is_logued_in
def change_pass():
bla
bla
And so on for all the other functions who needs that the user is sti
21 matches
Mail list logo