Sunday 15 August 2010

python - Flask Custom Login and Template Rendering -



python - Flask Custom Login and Template Rendering -

i new learning python web development , have decided go flask framework of selection of now. have chosen bare-bones approach on web development , want create much of web app custom , on own possible. have made basic mvc framework in php , create in python. researching ways interact database , add together user login/register back upwards , original thoughts wanted custom own methods , objects , not. similar how have done in php, can larn much developing own back-end efficiently long term production projects. in research found basic objects in flask such login manager, login-form , flask-admin, etc. don't thought of using these nicely packaged things have little command on , have not dev'd custom.

using kind of stuff sense not learning how of stuff works on lowest level not reproduce of benefits giving me later on in life when project circumstances alter , maximum flexibility, customization, maintainability, , efficiency needed. not in position right now, do know how write end stuff in php , wondering if means far managing sessions , authentication on own in python/flask, or if thinking totally out of ocontext , not close managing same stuff.

it great thought larn how authentication works @ low level -- it's particularly of import many people never larn stuff, , it's quite interesting!

what i'd recommend take @ official flask tutorial (http://flask.pocoo.org/docs/0.10/tutorial/), covers lot of (working straight sessions, etc.).

what not recommend, however, using sort of thing in production.

using own authentication code never thought -- it's much improve rely on supported library has been audited other people security issues.

in flask world you've got couple choices:

flask-login: https://flask-login.readthedocs.org/en/latest/ flask-security: https://pythonhosted.org/flask-security/ flask-stormpath: http://flask-stormpath.readthedocs.org/en/latest/

of 3, flask-stormpath -- i'm super biased wrote =)

flask-stormpath supports widest array of customization / etc., , allows whatever want it.

hope helps!

python authentication model-view-controller flask flask-login

No comments:

Post a Comment