Upgrading to Django 1 (beta)

[Update] A porting guide is now available.

Had a great opportunity to do the Django 1 upgrade for one of my projects during the Django sprint held this week in Tel Aviv university. Couldn’t dream of a better place to do it: with experts & other people doing the same thing.

Main things I had to do:

  • Changed the signals code to the new syntax
  • Changed the admin & admin docs url mapping
    • See the docs & also for admin docs
    • Also had some links in our app for admin pages (such as Logout, & Change passwords) whose links have changed in v1. Took the new URL’s from the admin source files.
  • Changed the models admin metadata to the new syntax & separated it to new admin.py for every app
    • This seems at first like a task that would take several days of manual labor. Luckily, a script was written to automatically migrate code, which worked great. I’ve applied it to all of our apps (about 20 in this project) manually (too bad it wasn’t extended to migrate full project).
    • Besides running the script, I had to remove the existing admin metadata code from the models.py files.

The sprint BTW was quite fun, though I didn’t get to help with Django bugs, just do the migration & testing. Meir Kriheli gave a great Django tutorial, & I gave a small presentation about some of Django projects I’ve done. I hope it’ll contribute to the local Django community to raise its head over the boring Java/.Net/PHP water.


1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s