Live data from Hacker News

Django 1.10 released

djangoproject.com

71–80 of 122 posts

Re: Django 1.10 released

#71
post #67
post #62

Earlier quoted context omitted.

Was pretty limited and very very inferior to SQLAlchemy. It still is, but it's bearable. 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?

That is true, but it was fixed in Django 1.4... in 2012. Technology moves a bit in 4 years.

Yep, but as I said it's still rather limited compared to SQLAlchemy. Stuff like aggregations are cumbersome, and it's really really easy to shoot yourself in the foot and cause O(n) queries (especially in templates and in custom admin views).

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.

Re: Django 1.10 released

#72
As someone who's picked up Python only in the last few years, Django is amazing. I'm particularly fond of Django CMS.

Does anyone know of a working "static site generator" for Django that works with Django CMS? Or maybe Wagtail? Something that would build out the static HTML pages ready to deploy to S3. Django CMS (thanks to Django itself) has a wonderfully robust back-office UI, and I feel like my Google-fu has failed me in finding that last puzzle piece to static site nirvana.

Re: Django 1.10 released

#73
post #3

I'm still stuck with Django 1.4 for one of my projects, it's such a big hurdle to upgrade it. I wonder if it's worth to just straight up rewrite it in 1.10.

It is quite scary for me to read that people have serious issues upgrading their frameworks, wouldn't it be better to use pyramid (or flask eventually) instead?

It is very mature and well supported - and the upgrades are usually painless since you can upgrade all the components separately so sqlalchemy for ORM or Jinja2 for templates - whenever you feel you are ready.

You will not get things like admin panel as a downside though.

Re: Django 1.10 released

#74

As someone who's picked up Python only in the last few years, Django is amazing. I'm particularly fond of Django CMS. Does anyone know of a working "static site generator" for Django that works with Django CMS? Or maybe Wagtail? Something that would build out the static HTML pages ready to deploy to S3. Django CMS (thanks to Django itself) has a wonderfully robust back-office UI, and I feel like my Google-fu has fail…

See http://docs.wagtail.io/en/v1.5.3/reference/contrib/staticsit... for Wagtail. I've been experimenting with django-bakery and wagtailbakery with much success.

Re: Django 1.10 released

#75
Recently after a 6 year hiatus from Django, I've experimented migrating a smallish flask API and wholly cow did the Django API get CLEANER. Like my god people talk about Django as if it hasn't changed in 6 years but it feels to me like many of the warts got removed and it's just down right pleasant to work with. I love Flask but there is just a little too much boiler plate when you compare it to modern Django for even small projects (IMO).

Re: Django 1.10 released

#76
post #27

Shame about Channels, but I see the logic in not including it. Django is pretty awesome as a backend, and while it's not a 'cool' framework anymore (I feel old!) it's amazing for writing back-office applications. 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 suc…

Why did the ORM suck before? Were there major changes done to the ORM?

sibling mentioned ORM migrations not being built in.

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.

Re: Django 1.10 released

#77

As someone who's picked up Python only in the last few years, Django is amazing. I'm particularly fond of Django CMS. Does anyone know of a working "static site generator" for Django that works with Django CMS? Or maybe Wagtail? Something that would build out the static HTML pages ready to deploy to S3. Django CMS (thanks to Django itself) has a wonderfully robust back-office UI, and I feel like my Google-fu has fail…

See http://docs.wagtail.io/en/v1.5.3/reference/contrib/staticsit... for Wagtail. I've been experimenting with django-bakery and wagtailbakery with much success.

How did I miss that? Thanks so much!

Re: Django 1.10 released

#78

As someone who's picked up Python only in the last few years, Django is amazing. I'm particularly fond of Django CMS. Does anyone know of a working "static site generator" for Django that works with Django CMS? Or maybe Wagtail? Something that would build out the static HTML pages ready to deploy to S3. Django CMS (thanks to Django itself) has a wonderfully robust back-office UI, and I feel like my Google-fu has fail…

* django-medusa https://github.com/mtigas/django-medusa

* django-bakery https://github.com/datadesk/django-bakery

* django-freeze https://github.com/fabiocaccamo/django-freeze

* django-staticgen https://github.com/mishbahr/django-staticgen

Re: Django 1.10 released

#79
post #63

Earlier quoted context omitted.

You might as well use Flask at that point. You can use cookie-cutter to create the starter packs.

Sure, I love Flask but Django has it's own ecosystem and that's what I'm talking about. I know anyone can use cookie-cutter, but I'm talking about trimming Django itself. Externalize Forms, Templates, etc. and build several core starter packages (including current Django). This gives a few base starting points.

There are two benefits to having subpackages in the way you describe. The first, as you mention, is to slim down the framework. I don't think this gains a whole lot except for trimming down deployment sizes. If you don't use the components then the code doesn't run.

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.

Re: Django 1.10 released

#80
post #76

Earlier quoted context omitted.

Why did the ORM suck before? Were there major changes done to the ORM?

sibling mentioned ORM migrations not being built in. 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 b…

> 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.

Is this really true? Can you point me at any tickets or examples? Everything else you've said is bang on though.

Post reply on HN