A friend has developed a flask application and now wants to add a login and security. I would like to know if it would be feasible to convert the flask application to web2py.

53 views
Skip to first unread message

Davidiam

unread,
Sep 26, 2021, 6:48:47 AM9/26/21
to web2py-users
A friend asked me if I would be interested in building the login/security layer for a flask / My SQL application on PyhtonAnywhere, but I don't know Flask and I really like web2py and have already created a few applications using web2py.

I told her that web2py has the security included and if it wasn't too much work, it may be easier to move the application to web2py and I told her I would try to find out how much work that would be.

So basically I would like to know how difficult it would be to convert a Flask-MySQL application to web2py.  Would the general structure of the application be the same?  It is a newly developed application and not very heavy in code, but has quite a bit of data.   

Py4web would of course also be an option but I have not used that yet so there would probably be a small learning curve involved.  I suspect Py4web would give better performance.

Kind Regards,
David

Jim S

unread,
Sep 27, 2021, 8:38:49 AM9/27/21
to web2py-users
I agree that py4web would give much better performance.

Do you know anything else about the application?  Does it use SQLAlchemy?

If the codebase isn't that large, converting to web2py and py4web wouldn't be terrible.

While I'd do it in py4web, auth in Flask isn't that hard. I'd recommend the Flask book by Grinberg or Corey Schafer's youtube videos to learn more about it.

-Jim

Walter Okine

unread,
Oct 5, 2021, 9:49:33 AM10/5/21
to web...@googlegroups.com
I also agree that py4web would give much better performance.
Web2py is easy so i dont think your friend will face much problem converting the application to web2py.
I have converted an app I wrote in flask to web2py and was able to do so.
The actual conversion i.e. database, html, css was a breeze, however i spent a whole day on the following;
 
1. had to create my own menu without using menu.py in models to create the menu
2. used blueprint and had to figure out  how to do the same in web2py using the controllers
3. had some issues uploading and retrieving uploaded data in upload folder

NB: The web2py documentation is key when you are faced with any issue.
In conclusion, please do try the conversion, you will learn alot and appreciate web2py. 

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/3c299169-b1c0-4c1a-9a98-9ae99bf49d25n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages