26 ms·
NoSQL support is one of the least interesting ways that I find Django failing to keep up. I'd much rather see catching up with regard to ORM/SQL efficiency imp
by famousactress 14y ago
NoSQL support is one of the least interesting ways that I find Django failing to keep up.
I'd much rather see catching up with regard to ORM/SQL efficiency improvements, cache infrastructure usefulness, resolving the manager/queryset/model-method wackiness, or a half dozen other things where I feel like I don't have much argument to make w/ Rails folks when it comes to comparing the frameworks.
- richardlblair 14y agoImprovement to the ORM should be the #1 priority IMO. This is my single biggest pain point with Django.
- czbond 14y agoAgreed. I keep looking for reasons to use Django for anything other than small/medium complexity apps - but Rails keeps winning for these..... yet I prefer Python but have to construct in Ruby.
- nilsbunger 14y agoI've never tried this, but is using SQLAlchemy with Django relatively easy and production-worthy?
- codewright 14y agoNothing about SQLAlchemy has ever been easy, in Django, Flask, or raw WebOb Python apps I've worked on. It's production-worthy, but the tax it levies on your soul probably isn't worth it. https://github.com/coleifer/peewee https://github.com/coleifer/peewee
- kenneth_reitz 14y agoYou can use SQLAlchemy's connection pooling in conjunction with the Django ORM: https://github.com/kennethreitz/django-postgrespool https://github.com/kennethreitz/django-postgrespool
- richardlblair 14y agoI work with Django full time on an app that is relatively large and complex. It works great, but that damn ORM costs me so much time. Everything else is great. I really enjoy how everything else works together. But, again, that damn ORM...
- anotherbadlogin 14y ago"resolving the manager/queryset/model-method wackiness" Care to elaborate on this? I'm just starting a new project and had settled on Django, but the whole server-side selection process has been a pain in the ass.
- jordanmessina 14y agoCan you elaborate on "resolving the manager/queryset/model-method wackiness"? I haven't used another web framework in a while so I'd like to see a comparison to understand your frustrations.
- famousactress 14y agoSomething like including this in core: https://github.com/zacharyvoase/django-qmethod https://github.com/zacharyvoase/django-qmethod The idea that if I want to do either: People.objects.short().blonde() People.objects.blonde().short() ... I need to implement short() and blonde() on Manager and QuerySet classes for the model. Creating chained query filters like this ought to be easier, and encouraged IMHO.
- rlander 14y ago> I'd much rather see catching up with regard to ORM/SQL efficiency improvements, cache infrastructure usefulness I hope you're talking about Sequel and not that namespace-polluting, memory-consuming, bloated beast called ActiveRecord. In that case, I wholeheartedly agree.
- famousactress 14y agoOh right, fair point. When it comes to ORM/SQL generation I don't know of anything Rails does particularly better. Someone told me that in Rails you're more aware of when you're creating new joins. I think that might be useful. In this django query there's an elegance that can come from each call to .filter() or .exclude() making their own join, but it confuses people as well... and not being able to re-use the joins makes it impossible to do things like get around the lack of a 'not-equal' operator in some cases [1]: Author.filter(books__page_count__gt=100).filter(books__deleted=False) Really though, in this case I just wish Django would do better than it does now.. or at least better than it did in prior versions [2]. There's hope though, @akaarial appears to be kicking ass and taking names in this area lately. [1]: https://code.djangoproject.com/ticket/5763 https://code.djangoproject.com/ticket/5763 [2]: https://code.djangoproject.com/ticket/10790 https://code.djangoproject.com/ticket/10790 and https://code.djangoproject.com/ticket/18785 https://code.djangoproject.com/ticket/18785