Re: [flask] http authentication for viewing particular page
- From:
- Rahul R
- Date:
- 2010-06-07 @ 12:30
On Mon, Jun 7, 2010 at 12:49 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> Le 06/06/2010 22:42, Rahul R a écrit :
> > Is it possible in flask to ensure that a particular page to be viewed
> > requires authentication ?
> >
>
> See http://flask.pocoo.org/snippets/8/
> The example uses a trivial function to check that a username/password
> pair is correct. You may want to replace it with something else like
> database query.
>
> Or if you want something simple like the example, you can avoid storing
> a password by using the check_password_hash function on a hash generated
> with check_password_hash. These functions live in Werkzeug (available
> for every Flask app) :
> http://werkzeug.pocoo.org/documentation/dev/utils.html#security-helpers
>
thanks , the wrapper function did help me .
I was wondering if i could incorporate my javascript which tells in how many
seconds it will get redirected.
For example
if the user reaches the restricted section then
the page should tell redirecting in 5...4...3..2...1. sec and then
redirect to a function
I already have my javascript , but how to i run my javascript in flask.