update script after migration to Django 1.4