Upgrading Django 1.6 to Django 1.7

Review Request #12253 - Created Dec. 19, 2017 and updated

Prakash Ranade
hue
new-django-upgrade-1.7
romain
commit a3d728ac1ada4db4151939bb52cdcf3fa5f1373b
Author: Prakash Ranade <ranade@cloudera.com>
Date:   Sat Dec 9 16:38:58 2017 -0800

    Upgrading Django 1.6 to Django 1.7, Added/fixed following issues:
        - South (database migration tool) has been removed and integrated in Django 1.7
        - GenericRelation field name: related_name became related_query_name
        - BooleanFields do not accept null values, in Django 1.6 it was not the case. We can use NullBooleanField.
        - post_syncdb has been renamed to post_migrate
        - syncdb renamed to makemigrations
        - StrAndUnicode does not exist in django.utils.encoding use python_2_unicode_compatible
        - find_management_module has been removed
        - django.middleware.security.SecurityMiddleware has been removed

:100644 100644 563863e603... a0a15a4c69... M	apps/beeswax/src/beeswax/models.py
:100644 100644 b22adb68f4... 49f002903a... M	apps/jobsub/src/jobsub/models.py
:100644 100644 b7148f838c... 9e72d59d4b... M	apps/oozie/src/oozie/models.py
:100644 100644 20a9be87b5... cf9129319c... M	apps/pig/src/pig/models.py
:100644 100644 fa68d34d4e... 30dbb3b428... M	apps/useradmin/src/useradmin/models.py
:100644 100644 72420c7b54... 8367269d14... M	desktop/Makefile
:100644 100644 adc58703a7... b7616b3249... M	desktop/core/src/desktop/lib/django_forms.py
:100644 100644 e02436ff73... c978471974... M	desktop/core/src/desktop/manage_entry.py
:100644 100644 3740aa7bc8... a2e018fd67... M	desktop/core/src/desktop/management/commands/test.py
:100644 100644 0d7fe7fc5f... bb27f0d77c... M	desktop/core/src/desktop/models.py
:100644 100644 a77673739d... 6238581a90... M	desktop/core/src/desktop/settings.py
:100644 100644 8882240255... 9d12dfb38d... M	tools/app_reg/build.py

tested using live cluster, hue.ini pointing to nightly servers

  • 6
  • 0
  • 0
  • 0
  • 6
Description From Last Updated
We would very probably need DB migrations for any model changes so that they stay in sync Romain Rigaux
same Romain Rigaux
Do we know if it should be self.code or self.CodeType? (saw both online) Romain Rigaux
Not needed anymore? How do we make sure it is still ran? Romain Rigaux
Why commented? Romain Rigaux
Can be removed if not used. Romain Rigaux
  1. Are the DB migrations still running?

  2. apps/beeswax/src/beeswax/models.py (Diff revision 1)
     
     

    We would very probably need DB migrations for any model changes so that they stay in sync

    1. What is default BooleanField? https://docs.djangoproject.com/en/1.7/ref/models/fields/#booleanfield default is None which can be set to False in "installed_example" case. Consider "installed_example" is None which means "installed_example" is not available.

  3. apps/jobsub/src/jobsub/models.py (Diff revision 1)
     
     
    1. setup_run default was None and now set to "False"

  4. Do we know if it should be self.code or self.CodeType? (saw both online)

    1. https://github.com/evanbrumley/django-report-tools/issues/6 will check with self.CodeType. I dont know the difference between "self.code" and "self.CodeType"

  5. Not needed anymore? How do we make sure it is still ran?

    1. yes it is not needed anymore. Kept it commented for the same reason. I can remove it.

  6. desktop/core/src/desktop/settings.py (Diff revision 1)
     
     

    Why commented?

  7. desktop/core/src/desktop/settings.py (Diff revision 1)
     
     

    Can be removed if not used.

  8. 
      
  1. https://docs.djangoproject.com/en/2.0/ref/middleware/#module-django.middleware.security seems to still exist too?

  2. 
      
  1. For the record on keeping older south migrations:
    - http://south.readthedocs.io/en/latest/settings.html#south-migration-modules
    - https://docs.djangoproject.com/en/1.7/topics/migrations/#libraries-third-party-apps
    - might need to keep older south or rename the imports of the migrations

  2. 
      
Loading...