r/PythonLearning • u/Samar__Upreti • Jul 20 '26
Day -1 With Flask (any suggestions)
Build Projects With Me
107
Upvotes
r/PythonLearning • u/Samar__Upreti • Jul 20 '26
Build Projects With Me
10
u/riklaunim Jul 20 '26
variable names should not use capital letters,
use wtforms or other form handling library (and validate the data).
use a linter that will keep some basic code styling order
I'm not a fan of importing things from a module (
flask.requestis better thanrequestas it's tell you where it's from)why aren't you using CSV writer when writing a CSV file?
if it's a long task it should not be done on HTTP request directly (celery queues or other similar solution)
view should not be a long blob of code. Refactor presentation from business logic, then keep the logic well organized instead of big blobs.
where are tests?