Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Django #168

Closed
wardcr opened this issue Apr 15, 2016 · 2 comments
Closed

Upgrade Django #168

wardcr opened this issue Apr 15, 2016 · 2 comments

Comments

@wardcr
Copy link
Contributor

wardcr commented Apr 15, 2016

After DRF was upgraded, we still need to update Django itself. Initial research was provided by Trevor in issue #28 and the remaining items from there include:

  • There are new TestCase enhancements to speed them up by using setUpTestData() instead of setUp(). Code changes needed but existing code will continue to work.
  • Check use of Model._meta in case there are deprecated calls.
  • GeoJSON native queries in database queries postgis extension is automatically created by migrate so a postgis template database is no longer needed.
  • Look into data migrations
  • manage.py tests --parallel
  • Added the json() method to test client responses to give access to the response body as JSON.
  • Update custom commands to use the new argparse system.
@wardcr wardcr added this to the Backlog milestone Apr 15, 2016
@dfaller dfaller modified the milestones: Sprint 04-25-2016, Backlog Apr 22, 2016
@dfaller dfaller modified the milestones: Backlog, Sprint 06-06-2016 Jun 7, 2016
@gisjedi gisjedi self-assigned this Feb 27, 2017
@gisjedi
Copy link
Contributor

gisjedi commented Feb 28, 2017

Things to review:

  • Use of check --deploy on production settings
  • UUIDField and DurationField for storing UUIDs
  • Investigate using setUpTestData for class wide data initialization. May be faster than setUp for TestCase level data initialization.
  • Use of data migrations instead of fixtures

Deprecation Compliance:

@gisjedi
Copy link
Contributor

gisjedi commented Mar 10, 2017

Issues discovered:

  • 'django.utils.log.NullHandler' was an alias, replaced with 'logging.NullHandler'
  • Updating to use JSONField is problematic as we as using the PostGres 9.3 JSON string field. If we use Django native PostGres support we will enforce a PostGres 9.4 upgrade and the JSONB field type. djorm-ext-pgjson does not support Django 1.10, so we will need to switch to a supported library (django-pgjson is one such that does not enforce an upgrade to JSONB type field)
  • Remove all use of url patterns in favor of simple url tuples
  • Replace all option_list with add_argument to argparse use within Django management commands.
  • select_related on related models appear to be broken on reverse relationships until Django 1.11. TODOs are used to indicate what should be done during 1.11 upgrade.
  • Middleware is not compatible with Django 1.10, upgraded to new style and replaced MIDDLEWARE_CLASSES with MIDDLEWARE list in settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants