
Django 1.8 released - amarsahinovic
https://www.djangoproject.com/weblog/2015/apr/01/release-18-final/
======
bebop
Some great things in this release:

\- official Jinja2 support, and a generic template interface

\- native postgres fields

\- uuid field

and it is an LTS. Time to get upgrading.

~~~
crdoconnor
>uuid field

This one is good.

I kind of wish it were default for primary keys, since the number of times I
got burned by having databases I couldn't easily merge (which UUIDs help a lot
with) way exceeds the number of times I had performance/memory issues caused
by actually using UUIDs.

~~~
kbaldor
Databases aren't my field, but I would expect this to hurt performance by
decreasing locality of keys.

This, of course, assumes that temporally-adjacent additions are related, but
this seems like a common case for large data sets since they often arise from
a series of measurements or transactions.

I created this account to make this reply because I imagine that someone here
is expert enough to set me straight if I'm mistaken.

~~~
wulczer
Postgres at least will store rows roughly in insert order. So whether you're
using integers or UUIDs for primary keys won't affect on-disk layout.

When scanning the index, the database will be traversing it in btree order,
anyway, so as long as the values are comparable, ints or UUIDs shouldn't
matter much.

------
JshWright
I'm especially excited about contrib.postgres[1].

HStoreField is going to be a significant improvement over the JSONFields we
have been using...

[1]
[https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/](https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/)

~~~
mslate
It humors and saddens me that Django is a web framework with an ORM bolted on.
SQLAlchemy has had a postgres driver that supports HSTORE and JSON/JSONB for
ages.

~~~
alexhill
Likewise, Django has had third-party hstore and jsonb fields for ages, but I
take your point. SQLAlchemy is beautiful.

The Django ORM has taken great strides lately. Another big improvement in 1.8
is the expansion of database expressions – you can now combine arbitrary
database functions and columns as you can in SQLAlchemy. This is a big step
towards a cleaner, logically consistent API, and makes extensibility (like
that offered in the new contrib.postgres) much easier.

Django's ORM also does things that SQLAlchemy's doesn't. Even at its highest
level SQLAlchemy requires explicit joins AFAIK.

That said the Django team is aware of SQLAlchemy's arguable superiority and
there have been numerous proposals to integrate it somehow. The most likely
plan would be to use SQLAlchemy core to replace the low-level SQL generation.
That way you could take a Django queryset and get its SQLAlchemy
representation, then continue building from there.

------
jalonso510
Really like that they added a way to store time intervals as python timedelta
objects. Previously i think the best approach was to store a number of seconds
as an integer and then calculate the number of minutes, hours etc.. yourself.

------
ralmidani
Great work, Django team!

I recently switched a project back to Django after some time playing with
Rails.

One of the biggest attractions of Rails is the asset pipeline, but splitting
the project and building the front-end with Ember-CLI takes away that
advantage, leaving Django far ahead (IMO) with its cleaner ORM, less magical
module importing, and Python's indented syntax.

~~~
sanderjd
I'd love to hear about your experiences with building APIs for single-page-
apps between Rails and Django. Were you using rails-api or just straight-up
Rails? Is there an equivalent API-focused "flavor" of Django, or if not, to
what extent did you find it easy to choose not to use server-rendering
functionality? I've used Django for more standard apps, and Rails for both,
but I'm curious about the pros and cons of using Django for this sort of
thing, because I have no experience with it.

~~~
chr15
Django REST Framework is the the most popular way to build APIs with Django.
Lot of neat features out of the box such as throttling and permissions make it
easy to build API endpoints.

[http://www.django-rest-framework.org/](http://www.django-rest-framework.org/)

------
lukasm
I really wish there was something as mature as Django in Go (A little bit
lightweight maybe)

~~~
niix
Build it :)

~~~
dguaraglia
Wouldn't a new framework be the opposite of the 'mature' framework s/he wishes
existed? :)

~~~
krylon
On the other hand, Django was a new framework, once. If you want to create a
web framework for Go that is equivalent to Django, you have to start
_somewhere_.

------
bdr
Thanks to the Django team for a incredibly well-run and well-documented OS
project!

------
tomjen3
Damn Django is pretty hard at sunsetting old versions. If they are going to
release a new one in October and only supply security upgrades to things that
are two versions behind, does that means you have to upgrade your system in
less than a year?

~~~
Xixi
Django has long term releases if you wish to upgrade less often.

The last LTR was Django 1.4 which will be supported until October 2015. The
new LTR is Django 1.8 which will be supported until at least April 2018.

~~~
danielsamuels
And Django 1.4 was released on the 23rd of March 2012, so if you stick with
the LTS releases you very rarely have to upgrade. I have to say though, I
wouldn't want to upgrade a 1.4 app to 1.8 - lots of big changes have happened
between those two releases.

~~~
cauterized
The reason for the LTS versions is in large part for enterprises that are
stuck on older versions of Python because of RedHat support contracts and the
like.

Django can move ahead and drop support for (honestly very outdated) Python
versions like 2.5 and 2.6 so that newer Django releases can take advantage of
additional features and nicer syntax in newer Python versions.

And companies stuck on python 2.6 because that's what's bundled in whatever
version of RHEL can still get security patches to Django.

It's unreasonable to expect the (volunteer) django maintainers to indefinitely
support every version of python or every version of Django.

And if you have no choice of upgrading to Django 1.5 yet, I'm sure you'd
rather continue to get security patches until you can upgrade to 1.8.

------
ElectricFeel
What is Django? What does it do?

~~~
sdrothrock
It's a MVC (Model-View-Controller) web framework made in Python that works
with a number of different kinds of databases.

Check out the models overview to get a feel for how powerful and simple it can
be to use:
[https://docs.djangoproject.com/en/1.8/topics/db/models/](https://docs.djangoproject.com/en/1.8/topics/db/models/)

~~~
tbatterii
Actually a MTV framework
[https://docs.djangoproject.com/en/1.8/faq/general/#django-
ap...](https://docs.djangoproject.com/en/1.8/faq/general/#django-appears-to-
be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-
template-how-come-you-don-t-use-the-standard-names)

~~~
sonthonax
Strictly speaking it's a MTV framework (like all traditional web frameworks
really).

But half the time people use it as a MVC framework where URL's act as the
final link back to the model.

------
lucianmarin
Can’t wait to update [https://sublevel.net](https://sublevel.net) to this
version!

