[tracker] upgrade to django 1.8

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
2 years ago

People

(Reporter: willkg, Assigned: willkg)

Tracking

Details

(Whiteboard: u=dev c=codequality p= s=input.2015q3)

(Assignee)

Description

4 years ago
edwin-after-1167194edwin-input
Input is currently using Django 1.7 (bug #1118765). Django 1.8 should release sometime in April 2015.

https://code.djangoproject.com/wiki/Version1.8Roadmap

Django 1.8 involves a major overhaul to the templating system. This is a big deal for us since Input uses Jinja2 for templating rather than the default Django templating engine.

Upgrading to django 1.8 will require us to redo our Jinja2 infrastructure and will likely allow us to ditch a bunch of libraries that are poorly maintained.

This tracker bug covers all the bugs involved in upgrading to Django 1.8.
I talked with Ricky about this a bit. We think we'll need to look into the following:

1. We should get rid of jingo-minify. That's covered in bug #1142093.

2. Fix django-browserid so that it works with Django 1.8 templates.

3. Fix/replace tower which I think requires Jingo.

4. Ditch Jingo and replace with a module/library that builds the Jinja2 environment (Django 1.8 has an empty Jinja2 environment) and also queries all the INSTALLED_APPS for helpers.py files which add Jinja2 filters/functions. There are a bunch of existing libraries that support Jinja2, but I think it'd be a lot easier to write our own that doesn't need to be backwards-compatible with prior versions of Django.


It's likely there's other work, too. Plus Django 1.8 probably has a lot of other changes.
According to an issue in django-browserid, fancy-tag hasn't been updated in years and doesn't work with Django 1.8:

https://github.com/mozilla/django-browserid/issues/280

Thus we're going to need to update to a django-browserid that doesn't use fancy-tag and also remove fancy-tag as a dependency.
Fixing the typo in the sprint field. :p

Django 1.8 added a --keepdb flag to the test system. I think that's the only feature of django-nose that we really like at this point. Figured I'd mention it:

https://docs.djangoproject.com/en/1.8/releases/1.8/#tests
Whiteboard: u=dev c=codequality p= s=inpu.2015q2 → u=dev c=codequality p= s=input.2015q2
Depends on: 1144159
Depends on: 1142093
Depends on: 1093857
Depends on: 1132455
Depends on: 1159867
Depends on: 1160387
Depends on: 1160495
Depends on: 1164031
No longer depends on: 1093857
Depends on: 1167192
Depends on: 1167194
Depends on: 1170160
I think we're at least 1/2 done here, but there's still some work to do. I'm moving this to 2015q3.
Whiteboard: u=dev c=codequality p= s=input.2015q2 → u=dev c=codequality p= s=input.2015q3
We might have to revisit our Fields:

https://docs.djangoproject.com/en/1.8/howto/custom-model-fields/#converting-values-to-python-objects

Adding a note to look into this when the time comes.
Note that we need to update django-grappelli along with Django.
Depends on: 1202288
Depends on: 1202647
Depends on: 1203117
Depends on: 1203118
Depends on: 1203119
Depends on: 1203120
Depends on: 1203121
Depends on: 1203124
Depends on: 1203126
No longer depends on: 1203126
No longer depends on: 1203117
No longer depends on: 1203118
No longer depends on: 1203119
No longer depends on: 1203120
No longer depends on: 1203121
No longer depends on: 1203124
Depends on: 1203173
Depends on: 1203119
Depends on: 1203118
No longer depends on: 1202647
Blocks: 1204666
Depends on: 1205013
Depends on: 1205370
All the rest of the changes in a PR: https://github.com/mozilla/fjord/pull/684
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Landed in https://github.com/mozilla/fjord/commit/5d269bd7585c21f468f13c7768352b519b2ac1f1

Pushed this to prod just now. Marking as FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.