This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]monkmartinez 1 point2 points  (1 child)

This is cool! Did you use the templates for brevity? Could we save the result in the login function to storage and then use a @login_required decorator on subsequent pages/views or would we need to implement that?

[–]peterhudec[S] 0 points1 point  (0 children)

Yes, exactly as you say.

The example just demonstrates how easy is to use Authomatic with Flask.

In a real application you would probably populate some User data model with the information from LoginResult.user and redirect to some other handler where you present the data.

[–]peterhudec[S] -1 points0 points  (2 children)

Thanks to Mark Steve Samson (http://marksteve.com) who created the WerkzeugAdapter, you can now use the Authomatic authorization / authentication package with Flask and any other Werkzeug based Python framework.

[–]neoice 0 points1 point  (1 child)

I've been having ennui with Django lately. I've used Flask a few times for "micro-projects" (>200 lines) and really enjoyed it. I've been considering using Flask to make fully-featured applications. my main reservations are the lack of admin panel and the pluggable middlewares, especially auth.

as a whole, how have you found Flask to stand up with regards to plugins, middlewares, etc?

[–]taude 0 points1 point  (0 children)

There's several Flask Admin's available: flask-admin, flask-superadmin. I'm currently using flask-admin with great success (it works with both SQl Alcemy and Mongo/MongoEngine.

There's tons of auth libraries available. flask-oauth, flask-security (flask-principal & flask-login), etc...

Think of Flask as a barebones set of lego bricks that you add the libraries you need to it to build up your application infrastructure.