
Django 1.5 release candidate available - jacobian
https://www.djangoproject.com/weblog/2013/jan/04/15-rc-1/
======
anderspetersson
The feature I like the most from this release is by far the swappable User
model. Needing an extra table and performing JOINs between the User and my
profile table have really been a pain.

I also like that some effort has been made to update the tutorial, when I
started back in 1.2 I recall the tutorial to be quite confusing and didn't
know where to go after I finished it.

Thanks all involved.

~~~
CoffeeDregs
That was what attracted me, too, as I was starting a new project yesterday,
but it turned out that the User model stuff is not as straightforward as I
expected. In particular, a number of external applications/libraries have
hard-coded references to auth.User, so those need to be patched.

So I'm using Django 1.5, but I'm using the old User->Profile setup, but I'm
storing relatively little on the Profile.

EDIT: I've not found User->Profile to be much of an issue. I only store extra
data in the Profile and don't have ForeignKeys against it, so I don't actually
use the Profile that often.

~~~
kmfrk
I imagine there'll be somewhat of a database migration hurdle going from the
profile configuration to auth.User, though. That seems like an incentive to
use the format at one's earliest convenience.

~~~
StavrosK
Yeah, it is a bit weird. It took me around a day to migrate everything.

------
Spiritus
The verbatim template tag is probably my favorite. Excellent when using
Angularjs together with Django templates.

[https://docs.djangoproject.com/en/dev/ref/templates/builtins...](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std:templatetag-
verbatim)

~~~
shabble
I felt like such an idiot when I finally realised why my mustache templates
refused to work.

------
rednukleus
Great! Does anyone have an estimate of when full Python 3 support is expected?

~~~
jacobian
So here's the deal:

Django 1.5 has "full" Python 3 support, at least from a technical level. It's
done, works, is well-tested. I'm planning on putting a Django 1.5 / Python 3.3
site into production later this year. So in that sense it's "done" now.

However, we sorta have to hedge our bets in terms of what we recommend
_others_ do.

We have a pretty serious backwards-compatibility promise, and we're not 100%
certainly we've nailed down all the Python 3 APIs perfectly. There's a small
(but non-zero) chance something might need to change between 1.5 and 1.6; we
want the ability to make that change backwards-incompatible (for Python 3
users) if possible.

Similarly, there's a small (but again non-zero) chance that there's a serious
bug or three in the Python 3 support. We don't want people getting bitten.

Finally, much of the "good stuff" in Django-land is actually in third-party
apps, many of which don't yet support Python 3. This puts a pretty big
obstacle in the way of a Django/Py3 site -- most real-world sites use a ton of
third-party stuff. So to use Django on Py3 right now you'll need to make a
bunch of "should I DIY this component or port it to py3 and submit a patch?"
decisions.

In the case of the site I mentioned up top these are tradeoffs I'm willing to
make. I know Django well enough to not be worried about potential bugs or
backwards-incompatibilities, and I have the luxury on this project of getting
to work on py3 patches as part of the deal.

Most people won't be so lucky, though, so we expect the majority of Django
users to wait until 1.6 to start seriously using Py3.

We don't have a firm timeline yet. I'm guessing something like 6-9 months for
1.6, but that depends on a lot of different things. It could be longer, as
much as a year, or possibly even as short as 3-4 months. We'll see :)

~~~
ambiate
Is there a non-zero chance that all Python 2.* support will be removed in the
future (2-3 years)? I'm with a company that's currently toying with the idea
of using Django in our production environment. Py3 is a no-show in our plan or
goals.

~~~
jacobian
At some point, yes, we'll drop Python 2 support. When really depends on how
rapidly we see adoption (from users and re-distributors of Django) and how
heavy the dual-version support burden turns out to be. My guess is what we're
looking at a longer support window than the 2-3 years you posit, but that's
really just a half-assed guess. Anything between "next year" and "never" would
be a reasonable guess too...

... and y'know, Python 3 _should_ be on your radar, if not necessarily what
you use right now. It's better than Python 2 in every way (except for
adoption, and that's changing). 3.3 in particular has a ton of really great
new stuff (futures! working namespace packages! yield from!) that you'll
wonder how you lived without.

~~~
gtaylor
This! I'm so glad to hear this straight from one of the maintainers. Python
3.3 is the first version of Python 3 that has made me stop and say, "Wow, this
really makes my life easier/better". The sooner we as an ecosystem get moving
on, the better.

~~~
kenneth_reitz
It's going to get worse before it gets better.

But, it'll be worth it.

------
eze
I hope folks don't mind this rather off-topic question here. Is there a
JavaScript-based equivalent to Django or Rails? My (limited) understanding is
that node.js, Meteor et al are rather different beasts.

~~~
wheaties
Locomotive and Railway to add two more.

------
juice13
Looking at the wall of (f|s)ame, there's still some vital projects without py3
support: south, fabric, mysql-python. Don't see myself developing without
those.

~~~
btgeekboy
On the upside, MySQL seems to have restarted work on Connector/Python which
both claims to be Python 3 compatible and is pure Python (i.e. doesn't simply
wrap the binary MySQL client library).

------
streeter
I'm looking forward to the swappable User model feature. Has anyone seen or
heard of a site that has looked at migrating from a profile approach to a full
in swapped User model? What does that migration look like and how painful was
it?

~~~
superxor
God, I was so fed up with django.contrib.auth.models.User, not being able to
ignore Username was probably the most insane part, I always felt email was a
better choice than Username. I along with a bunch of people I know are looking
forward to swappable User model, far saner than the round-about approaches I
was using.

~~~
Nagyman
It's not terribly straight forward to do this, depending on which apps you may
use. E.g. django-registration or even django.contrib.admin. Username is hard
coded in many places. It will get there, but apps have some work to do.

~~~
kmfrk
I think you can just override the default clean_username() in
RegistrationForm:

[https://bitbucket.org/ubernostrum/django-
registration/src/27...](https://bitbucket.org/ubernostrum/django-
registration/src/27bccd108cdef30dc0a91ed1968be17bb1e60da4/registration/forms.py?at=default#cl-45)

Looks like that's the only place that enforces duplicate usernames.

------
michaelmior
I've been using Django 1.5 for about a month for a couple side projects and
it's been working great. A couple quirks with third-party modules (mostly
related to the change in the default {% url %} template tag syntax). Anyway,
awesome work by the Django team here!

------
adrianscott
Just tried out StreamingHttpResponse and it's looking great. The User model
should work well w/ the MongoEngine project (for MongoDB and Django), I'll
look at upgrading it to support that.

------
pplante
This came just in time for the first release of my webapp later this month.
Hopefully the upgrade goes smoothly. Thanks guys!

------
Yuioup
Is there support for composite keys in the model? This was a feature I was
missing when I researched Django a while ago.

------
d0m
Finally, verbatim.. I was tired of always needed to include it.

    
    
      {% verbatim %} template tag

------
dakota
I just started learning 1.4! :-)

------
Stratego
I like the way you time your releases, boy.

------
rshe
"the D is silent"

------
mustefaj
Django Unchained?

~~~
mustefaj
HN needs to lighten up, -4 points for that comment? Why So Serious?

