I use it as an API backend with Django-rest-framework. The advantage is you get ridiculous amounts of packages that all integrate with Django that does pretty much anything you want. Also the ORM doesn't suck now so that's a bonus.
I use it as an API backend with Django-rest-framework. The advantage is you get ridiculous amounts of packages that all integrate with Django that does pretty much anything you want. Also the ORM doesn't suck now so that's a bonus.
This week I'm using Channels again too. I'm making a head-to-head Minesweeper web app where you can challenge and compete against other players. After finding an opponent, essentially you'll see your own board and your opponent's board side by side, and each players' progress is broadcast in real time via Channels to one another.
https://www.kickstarter.com/projects/andrewgodwin/schema-mig...
As an example off the top of my head when I started with Django you couldn't bulk create objects, if you wanted to create 100 records it needed 100 separate INSERT statements. That got old fast.
Edit: Not sure why the downvotes, perhaps comment on why you think I'm wrong?
Things specific to Postgres are rather lacking. While they added support for advanced datatypes like arrays, hstore, intervals and search recently (yay!) you still can't use any other index than a standard btree one or things like recursive queries. SQLAlchemy supports all of these, and has done since forever.
Things are progressing, don't get me wrong, but there is a long way to go.
A GSOC project is currently adding customisable indexes: https://groups.google.com/forum/#!topic/django-developers/XA...
It used to be that it was very hard to write custom expressions or aggregations (like `SUM`) in a way that would be first-class with ORM-provided expressions. This has been massively improved, and been made into a public API. So if the ORM doesn't support something you can write it easily.
The core has also been majorly rewritten, which has made entire classes of bugs disappear. Before 1.8, it was possible to write expressions where the filters got so complex that the ORM would just give up.
The way the ORM would give up is drop all filters. So you write your 3-line filter, and the ORM does nothing. It doesn't blow up, it just does a straight SELECT call on the table without filtering. A nightmare.
This doesn't happen anymore.
A lot of old Django core code isn't really super durable, and you get a lot of pain because of it. But the past couple of releases have cleaned up a lot of code, making Django into an extremely clean project.
Is this really true? Can you point me at any tickets or examples? Everything else you've said is bang on though.
I did report a related bug[0] where the ORM gets confused by complex queries, but it didn't just drop the filter. It blew up, which is better but still a bit concerning.
I would love to see Django split up into smaller official external packages and repackaged as two or three different official starter packs (Traditional, API, SPA, etc.) with each containing a different set of packages that make sense (DRF, Channels, Models, Views, Forms, etc.).
I know this goes against the current "Batteries are included" model, but why can't we treat Django as the standards body, and the various starter packs as the more targeted "batteries are included" frameworks.
The other benefit would be so that the components could be used outside of Django. Using forms or templates might appeal to projects outside of Django. This isn't currently possible for a large majority of components since they depend on the global settings module, and/or other components.
What could be done with the dependency constraints is to build in different templates that `startproject` would create for you. It'd only be able to modify settings and write out requirements files, but it'd achieve a structure for different app types.
I don't know what is normal for Ruby. Basic crud app in Java tends to be 20-50MB, but DJango above doesn't have DB drivers or anything yet so I suspect it is similar.
*seems reasonable.
By that point you may as well just import Django, bootstrap it and use what you need.
The other side of this argument, is you allow each component to be developed at its own speed. Again, the integration between elements (Models→ModelForm→Forms etc) is so tight this isn't practical. Just as making them less integrated [probably] makes them harder to use for people who just want to use Django.
I'm somewhat conflicted about Channels. On the one hand it's cool what you can do with it and the design cleverly avoids rewriting all of Django to be async. On the other hand it is crazy how many shenanigans one needs to pull off to achieve what comes for free with Go or Erlang.
Fashion-like churn is obviously nonsense and reinventing the wheel usually a waste of time. But when you need a really round wheel and your current tools can only make hexagons...
Yeah, in other words, it's now both mature and with a rich ecosystem. Just the ticket!
And I wouldn't even say that people went for it because it was "hot new" back in the day. People went for it because it solved their problems. Being in fashion was never it's strong point, Rails and Node/Express did far better with that.
I picked up Django in February 2006, in fact the (very cool) boss I had back then picked it up for me and my other programmer colleague, I think it was version 0.96 (or maybe 0.92 ?, not sure). Anyway, we didn't pick Django because it was "new and cool", my boss had a business to run (which folded two years later for unrelated reasons), but instead because Django seemed like a pretty good candidate back then at doing a decent job. Which it did, admirably well, I think ours might have been one of the first lead-management systems built on top of Django's admin interface (lots of monkey-patching involved, which is still one of my "guilty" soft-spots as a programmer 10 years later).
Anyway, web programming back then was, how to put it, in a very interesting place. In Python's case we had Zope/Plone, which had sort of its separate ecosystem doing weird (but sometimes very interesting things) like an object-oriented database (hello, ZODB!) with a very interesing routing mechanism on top of it, Quixote (https://wiki.python.org/moin/Quixote) and mod_python (on top of which I built my first personal Python web-project). PHP was the hot thing, even though not the newest thing, Java's web offering consisted in Struts and some other thing which had a related name for which you needed to be an "Java architect" in order to put 2 forms and 3 templates together, Rails was just about to be launched, ASP was a joke (at least according to my other programmer colleague, who was also teaching ASP at University) and I won't comment on Perl, of which I know not too many things (and which seemed pretty cool, I have to admit).
Considering all this of course that Django (and Rails) was a huge breath of fresh air. People nowadays take things like JS web frameworks for granted, but until not too long ago the web was a very different place (which sometimes I really miss).
In the 2000s, it seems much more like all the attention went to RoR. Now all the attention goes to JavaScript.
In the meantime, Django has steadily added new functionality while adhering to smart core principles. It really does seem to be in the sweet spot of dependability and convenience. I don't think anything else is faster to develop with.
They were both scorching hot until somebody decided doing everything in Javascript was a good idea.
(Edit FTR: Given the topic thread, I feel it important to say that I didn't mean Node et al are better than Django, just that these hipsters thought —by virtue of being newer and newer is always better— it time to move on. I'm a Django dev and judging by the positive state of development, will be for a LONG time.)