Answer the question
In order to leave comments, you need to log in
Django vs Flask?
Hi everybody.
Write or give where to read about a good comparison of these two frameworks. I am familiar with Flask. Like already ears squeak. Should I look into Django? What are the benefits? What are the downsides?
As far as I understand, Django is easier with localization. Or am I wrong? What else?
Of course only versions for Python 3.*
Thanks!
Answer the question
In order to leave comments, you need to log in
Well, 1000 times:
dzhanga - a cloud of batteries, a rigid structure of the application, you don’t really need to think about
problems - everything that dzhanga doesn’t mean, like a template engine is faster, orm another and blah blah blah, you’re tormented, plus deploying it on combat servers is also a task not difficult but hemorrhoids.
flask - I love flask))))) I screwed whatever I wanted, plugins are easier to write, so you can make your crutches as much as you like, quickly deploy on the server? it’s not a problem, it’s easier to land on a Tornado , well, in fact, all this is also its disadvantage. Well, actually advice for comparison here)
It's actually less difficult to understand the advantages of Flask over Django for a large application. But for some reason, many articles and reports pour a lot of negativity towards django. Here is one of the few reports where flask is not praised to the skies: https://www.youtube.com/watch?v=7SmWn05m1Tk
My opinion listing the advantages of Django. Most likely, these disadvantages are connected with the fact that I didn’t fully smoke Flask or I’m trying to make Django out of it.
1) Django doesn't have the love for global variables that Flask does.
@app.route('/login', methods=['GET', 'POST'])
def login():
if request.method == 'POST':
do_the_login()
else:
show_the_login_form()
request
looks creepy. And accordingly, the question is born what to do if I need to use request
outside , login
say, in the method do_the_login
. request
in the method parameter or should I still use the global variable request
. The first option seems correct to me, since otherwise the dependencies of the method are implicit. But if you stick to the first option, then it is not clear why the global variables were added initially. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question