Closed Bug 1146686 Opened 7 years ago Closed 6 years ago

[tracker] upgrade to django 1.8


(Input Graveyard :: Code Quality, defect)

Not set


(Not tracked)



(Reporter: willkg, Assigned: willkg)



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

Input is currently using Django 1.7 (bug #1118765). Django 1.8 should release sometime in April 2015.

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 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:

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:
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
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:

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: 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
Depends on: 1203173
Depends on: 1203119
Depends on: 1203118
No longer depends on: 1202647
Depends on: 1205013
Depends on: 1205370
All the rest of the changes in a PR:
Assignee: nobody → willkg
Landed in

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