Re:Flask vs. Django: Worksheet to choose the right framework
by neurosnap on Thursday April 23, 2015 @02:39PM
(#9428855)
Interesting, I take the opposite approach: As your project starts to grow, you end up ripping out the "batteries" of django and implementing other modules. The most notable one would be SQLAlchemy.
[ Parent
| on HN ]
Re:Flask vs. Django: Worksheet to choose the right framework
by rlander on Thursday April 23, 2015 @03:25PM
(#9429195)
Yup. I switched to Flask mostly because I always ended up ripping Django apart:
- Jinja instead of Django templates.
- Custom (and sane) class-based views instead of Django's disgusting defaults.
- Custom class-based settings.
- There's no way to define app-only middleware in Django. Flask blueprints make it trivial.
However, 10 years later and no framework has come close to Django's true strength: built-in admin.
Re:Flask vs. Django: Worksheet to choose the right framework
by Igglyboo on Thursday April 23, 2015 @04:03PM
(#9429452)
Just an FYI, the newest version of Django (1.8) now supports Jinja or Django templates by default and you can plugin other templating engines if you want.
Re:Flask vs. Django: Worksheet to choose the right framework
by Zopieux on Friday April 24, 2015 @08:32AM
(#9432829)
Did you try to use Jinja2 templates in 1.8? There is hell of a bootstrapping to do until you can actually start working with these. Don't even try to use both at the same time within the same project. You'll end up crazy before you can make Django load the right template.
Re:Flask vs. Django: Worksheet to choose the right framework
by Igglyboo on Friday April 24, 2015 @01:45PM
(#9434872)
No I haven't, still on Django 1.6 at work but I keep up with the newest developments. That's a shame, from what I read it sounded like it was just a simple config setting that would allow you to use Jinja over Django templates.
Re:Flask vs. Django: Worksheet to choose the right framework
by mtbcoder on Thursday April 23, 2015 @04:17PM
(#9429525)
You don't have to use Django's class-based generic views either. Nothing wrong with just inheriting from the base View if you really want.
Re:Flask vs. Django: Worksheet to choose the right framework
by emidln on Friday April 24, 2015 @05:07AM
(#9432135)
You can also just skip the infinite inheritance and implement function-based views.
Re:Flask vs. Django: Worksheet to choose the right framework
by dev360 on Friday April 24, 2015 @05:24AM
(#9432168)
Interesting. Almost every experienced Django dev I know throws out the admin on their projects nowadays.
Re:Flask vs. Django: Worksheet to choose the right framework
by hackerboos on Friday April 24, 2015 @06:14PM
(#9436295)
In favour of what?
Re:Flask vs. Django: Worksheet to choose the right framework
by andybak on Saturday April 25, 2015 @07:36AM
(#9438028)
I don't.
Re:Flask vs. Django: Worksheet to choose the right framework
by collyw on Friday April 24, 2015 @04:04AM
(#9431979)
I am curious about this. I like Djangos ORM for the basic stuff, but it doesn't work on even moderately complex queries (conditional aggregates are a serious loss). Would I gain much by going to SQL Alchewy over just using raw SQL, which is what I do at the moment? (bearing in mind replacing the Python ORM completely, and you will loose the admin, which I use heavily).
Re:Flask vs. Django: Worksheet to choose the right framework
by huxley on Friday April 24, 2015 @10:36AM
(#9433578)
It's a pretty recent development, but have you tried Django 1.8's Conditional Aggregation and Conditional Expression features?
https://docs.djangoproject.com/en/1.8/ref/models/conditional...