vendredi 1 avril 2016

Flask microframework: difference between using app.py and run.py

I am trying to create a website for a existing project, and have been tasked to use Python and the Flask microframework. They team that is doing the original project had something for there web folder, but it looked strange. The way I have learned flask is that there is a views.py folder that does all the Python logic and routing and renders a template with Jinja2. This way also start the server by having a run.py file. However, the way the main team start there website in Flask is by just having a file named app.py that contains the same code as I would find in views.py, but with no way to run it. Can someone elaborate? I can't find much on the difference between the two. Thanks much.




Aucun commentaire:

Enregistrer un commentaire