librelist archives

« back to archive

Filtering Requests

Filtering Requests

From:
Ari King
Date:
2014-03-26 @ 23:15
Hi,

I'm just starting out with Flask and I'd appreciate help in understanding
how routes can be filtered. For example, let's say I have the routes
"/home", "/public", and "/private" how can I setup filters to run for
routes "/home" and "/private" but not "/public"?

Thanks.

-Ari

Re: [flask] Filtering Requests

From:
Christian Barra
Date:
2014-03-26 @ 23:22
Something like @login_required ?


2014-03-27 0:15 GMT+01:00 Ari King <ari.brandeis.king@gmail.com>:

> Hi,
>
> I'm just starting out with Flask and I'd appreciate help in understanding
> how routes can be filtered. For example, let's say I have the routes
> "/home", "/public", and "/private" how can I setup filters to run for
> routes "/home" and "/private" but not "/public"?
>
> Thanks.
>
> -Ari
>



-- 

Christian Barra

Re: [flask] Filtering Requests

From:
Ari King
Date:
2014-03-27 @ 01:29
Yes, essentially.


On Wed, Mar 26, 2014 at 7:22 PM, Christian Barra <barrachri@gmail.com>wrote:

> Something like @login_required ?
>
>
> 2014-03-27 0:15 GMT+01:00 Ari King <ari.brandeis.king@gmail.com>:
>
> Hi,
>>
>> I'm just starting out with Flask and I'd appreciate help in understanding
>> how routes can be filtered. For example, let's say I have the routes
>> "/home", "/public", and "/private" how can I setup filters to run for
>> routes "/home" and "/private" but not "/public"?
>>
>> Thanks.
>>
>> -Ari
>>
>
>
>
> --
>
> Christian Barra
>

Re: [flask] Filtering Requests

From:
Christian Barra
Date:
2014-03-27 @ 07:11
http://flask.pocoo.org/docs/patterns/viewdecorators/#login-required-decorator

http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-v-user-logins


2014-03-27 2:29 GMT+01:00 Ari King <ari.brandeis.king@gmail.com>:

> Yes, essentially.
>
>
> On Wed, Mar 26, 2014 at 7:22 PM, Christian Barra <barrachri@gmail.com>wrote:
>
>> Something like @login_required ?
>>
>>
>> 2014-03-27 0:15 GMT+01:00 Ari King <ari.brandeis.king@gmail.com>:
>>
>> Hi,
>>>
>>> I'm just starting out with Flask and I'd appreciate help in
>>> understanding how routes can be filtered. For example, let's say I have the
>>> routes "/home", "/public", and "/private" how can I setup filters to run
>>> for routes "/home" and "/private" but not "/public"?
>>>
>>> Thanks.
>>>
>>> -Ari
>>>
>>
>>
>>
>> --
>>
>> Christian Barra
>>
>
>


-- 

Christian Barra