This section describes the changes between 0.96 and 1.0 that most users will need to make.

Change string literals ( 'foo' ) into Unicode literals ( u'foo' ). Django now uses Unicode strings throughout. In most places, raw strings will continue to work, but updating to use Unicode literals will prevent some obscure problems.

Below is an example models.py file with all the changes you’ll need to make:

Remove all your inner class Admin declarations from your models. They won’t break anything if you leave them, but they also won’t do anything. To register apps with the admin you’ll move those declarations to an admin.py file; see the admin below for more details.

Remove the core argument from your model fields. It is no longer necessary, since the equivalent functionality (part of inline editing ) is handled differently by the admin interface now. You don’t have to worry about inline editing until you get to the admin section, below. For now, remove all references to core .

Remove the prepopulated_from argument on model fields. It’s no longer valid and has been moved to the ModelAdmin class in admin.py . See the admin , below, for more details about changes to the admin.

Replace your model’s __str__ function with a __unicode__ method, and make sure you use Unicode ( u'foo' ) in that method.

Rename your maxlength argument to max_length (this was changed to be consistent with form fields):

The Admin¶

One of the biggest changes in 1.0 is the new admin. The Django administrative interface ( django.contrib.admin ) has been completely refactored; admin definitions are now completely decoupled from model definitions, the framework has been rewritten to use Django’s new form-handling library and redesigned with extensibility and customization in mind.

Practically, this means you’ll need to rewrite all of your class Admin declarations. You’ve already seen in models above how to replace your class Admin with an admin.site.register() call in an admin.py file. Below are some more details on how to rewrite that Admin declaration into the new syntax.

Use new inline syntax¶ The new edit_inline options have all been moved to admin.py . Here’s an example: Old (0.96): class Parent ( models . Model ): ... class Child ( models . Model ): parent = models . ForeignKey ( Parent , edit_inline = models . STACKED , num_in_admin = 3 ) New (1.0): class ChildInline ( admin . StackedInline ): model = Child extra = 3 class ParentAdmin ( admin . ModelAdmin ): model = Parent inlines = [ ChildInline ] admin . site . register ( Parent , ParentAdmin ) See InlineModelAdmin objects for more details.