Django 1.7 alpha 1 released
djangoproject.com> Applications can run code at startup, before Django does anything else, with the ready() method of their configuration.
I have been waiting for something like this for a very long time. No more wondering where signals should go. [0]
[0]https://docs.djangoproject.com/en/dev/ref/applications/#djan...
God, yes. I even asked for a signals.py so they could be declared there, but this is even better. I'm very excited about this.
yes! No more circular imports because of signal receivers being added to models.py. Super excited about this.
It's great to see schema migrations move into Django core. South is great, but Django will be much better with schema migrations baked in, especially for newcomers.
For anyone coming to Django from Rails, South seems anomalous. Outside of database migrations, Django is a very battery-included framework, so it's weird that until 1.7 data migrations were handled by third party tools (mostly South) and not mentioned at all in the Django documentation.
This is a big step for Django. I'm excited for the (not too distant) future when 1.7 is the official release.
Totally agree. It is such an important part of a Django project where Models are involved. Every release of Django brings exciting and well thought through features. Future looks great for this awesome Python framework!
I wonder if there will be a tool to convert (migrate?) South migration data to Django's native format.
The recommended upgrade path seems to be:
* Apply all South migrations to all database servers,
* Delete South migrations,
* Create new initial (create table) migrations for the current schema.
This makes sense, as migration code is supposed to be temporary. Migrations should exist in the codebase until the last database has them applied. Once all databases are up-to-date, it's better to delete them and "rebase" migrations to the current schema.
Old, fully applied migrations will still stay documented in the version control history, but they shouldn't be part of the master tree, much like obsolete code should be deleted instead of left commented out.
This has the added advantage of removing old, crufty migrations. We do this every few months, as there will usually be some problem that will prevent migrations from applying cleanly on new installations (someone made a mistake and reverted imperfectly, something collided and the resolution didn't delete some data, etc).
It has been stated by Andrew Godwin (author of South and the new native migrations) that there will be a clear path to switch from South to native migrations. And also for people who can't upgrade to 1.7 there should be South 2 with some of the new features backported from native migrations.
It's now documented and everything: https://docs.djangoproject.com/en/dev/topics/migrations/#upg...
South2: https://github.com/andrewgodwin/south2 "This is the repository for South 2, the backport of Django's migrations code into a separate installable package for Django 1.4, 1.5 and 1.6."
Django's all grown up! I'm pretty psyched about this release. Obviously, the long-awaited migrations functionality is the centerpiece, but for a framework without that many rough edges, they do such a great job of finding the ones that remain and terminating them. Looking forward to the end of magical models.py behavior; to stronger support for apps; easier to use custom QuerySets and reverse relation Managers; and Lookups, Transforms, and custom prefetching in the ORM. This is looking like the most exciting release since 1.4 for tightening up the core of the framework.
Anybody have any insight into what's next?
Potential things for 1.8 that I'm aware of are composite fields and improved aggregates. Hopefully, there'll also be some work on .values(), .annotate(), and .order_by() that will allow a much broader range of options, which is part of a larger internal refactor of the ORM. No guarantees on any of the above though.
> Additionally, users of South (a popular third-party package for schema migrations) should note that South is not compatible with the 1.7 alpha.
Is this because of the new migrations built-in module? [0]
Yes. The author of South is writing the built-in migrations, and keeping a 3rd party migration library would be redundant.
Wasn't the "New system check framework" already in 1.6? I remember seeing warnings about BooleanFields without defaults.
I wrote that BooleanFields without defaults patch! I'm glad that the warning has been seen by at least one person!
The ./manage.py validate command has been replaced with ./manage.py check in Django 1.7. The new system checks framework [1] is extensible, so third party apps will be able to add their own checks.
Hello, I'm interested in contributing to django, could you please give me a few pointers ? The django ticket list is daunting for a newcomer, that I don't know what to start with. My email's in the profile, and I'll be checking this comment as well. Thanks.
It took me quite a while to find tickets and patches that I could work on. I started with a couple of really trivial documentation fixes, and am building from there. I agree that the ticket list can be a bit daunting, so don't give up!
Searching the tickets that require documentation [1] or unit tests [2] can be a good place to start. It's a sign that a bug or new feature has been accepted, and that the patch can be accepted with some improvement. If a ticket is assigned to somebody, but hasn't been worked on for a few weeks, then don't be afraid to pick it up and improve it.
If there are any sprints happening near you, then go along. Daniele Procida runs a workshop Don't Be Afraid to Commit, which covers a lot of the basics you need to write your first Django patch (git/sphinx/...). The workshop is online [3].
There's a low traffic Django Core Mentorship mailing list [4] that you could join, or #django-dev on IRC might be helpful.
Good luck!
[1] https://code.djangoproject.com/query?status=!closed&needs_do...
[2] https://code.djangoproject.com/query?status=!closed&needs_te...
[3] https://dont-be-afraid-to-commit.readthedocs.org/en/latest/
[4] https://groups.google.com/forum/?fromgroups#!topic/django-co...
Internal validate code was spread right around the framework in various places. It has been refactored into a single, extensible location.
The (preliminary) release notes are full of nice things https://docs.djangoproject.com/en/dev/releases/1.7/
Only a week or so after I upgraded to 1.6