Flask Login: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Created page with " cd Projects mkdir FlaskTest cd FlaskTest virtualenv . source bin/activate pip install flask pip install flask-wtf pip install flask-script pip install flask-login..."
 
Brian Wilson (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
How to use Flask Login
== Try it out with the sample ==
  cd Projects
  cd Projects
  mkdir FlaskTest
  mkdir FlaskTest
Line 12: Line 16:
  pip install simple-pbkdf2
  pip install simple-pbkdf2


get source code from bitbucket
Clone source code from bitbucket using sourcetree or git or hg https://bitbucket.org/audriusk/flask-login-example
 
Create a sample sqlite3 databas
python manage.py initdb


Run the server
  python manage.py runserver
  python manage.py runserver
  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  * Restarting with stat
  * Restarting with stat


Log in to http://127.0.0.1:5000/ as foo/baz
Log in to http://127.0.0.1:5000/ as foo/foo (admins group) or bar/bar (users group)
Admins can access the "restricted" tab, users cannot.

Latest revision as of 22:09, 5 June 2015

How to use Flask Login

Try it out with the sample

cd Projects
mkdir FlaskTest
cd FlaskTest
virtualenv .
source bin/activate

pip install flask
pip install flask-wtf
pip install flask-script
pip install flask-login
pip install simple-pbkdf2

Clone source code from bitbucket using sourcetree or git or hg https://bitbucket.org/audriusk/flask-login-example

Create a sample sqlite3 databas

python manage.py initdb

Run the server

python manage.py runserver
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat

Log in to http://127.0.0.1:5000/ as foo/foo (admins group) or bar/bar (users group) Admins can access the "restricted" tab, users cannot.