Make NAV compatible with Django 1.7

Bug #1248195 reported by Ole Martin Bjørndalen
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
Morten Brekkevold

Bug Description

python/nav/web/webfront/views.py uses django.views.generic.direct_to_template which no longer exists in Django 1.5.

Django 1.4 is old, and a new Debian release has been frozen with Django 1.7 in it.

We should target Django 1.7, likely for NAV 4.3, but simultaneous compatibility with version 1.5 and 1.6 is desirable, if at all possible.

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

I don't think this is the only thing that prevents NAV from running on Django 1.5.

NAV will likely target Django 1.4 for at least another year, basically until Debian 8 comes out. It doesn't hurt if we can write code to be compatible with both Django 1.4 and newer versions, though. It will ease the transition when we get there.

Changed in nav:
status: New → Triaged
importance: Undecided → Low
summary: - Front page crashes with Django 1.5.4
+ NAV is incompatible with Django 1.5
Revision history for this message
Ole Martin Bjørndalen (olemb) wrote : Re: NAV is incompatible with Django 1.5

OK.

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote : Re: NAV is incompatible with Django 1.5 through 1.7

I've updated the title and description of this bug report. We have decided that we should begin targeting Django 1.7, as the next Debian release will feature this more modern Django version.

Assigning it to Christian, as we have no set deadline for this yet.

Roy Sindre Norangshol has created a pull request where he attempts to make NAV compatible with Django 1.4 through 1.6. It is not complete, and as far as I understand, it will be nearly impossible to keep compatibility with 1.4 as we move towards 1.7.

See https://bitbucket.org/mbrekkevold/nav-mirror/pull-request/94/django-15-and-django-16-fixes/diff

Changed in nav:
assignee: nobody → Christian Strand Young (lizter)
summary: - NAV is incompatible with Django 1.5
+ NAV is incompatible with Django 1.5 through 1.7
description: updated
Changed in nav:
importance: Low → Medium
status: Triaged → In Progress
Revision history for this message
Peter Gervai (grin) wrote :

Could you kindly offer some progress report on this?

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

Peter, the current dev branch is here: https://bitbucket.org/lizter/nav-mirror-django-upgrade/commits/branch/django-upgrade

It currently passes our test suite at https://ci.nav.uninett.no, but I'm not sure how far behind trunk it has fallen by now (Christian updates it intermittently).

The branch makes NAV compatible with Django 1.7. It has proven impossible to keep backwards compatibility with older Django versions.

Debian Jessie (the next Debian Stable release) release date has been announced as 25th April. Jessie comes with Django 1.7. This means we will likely merge the django-upgrade branch with trunk in time for the NAV 4.3 release.

Changed in nav:
milestone: none → 4.3.0
summary: - NAV is incompatible with Django 1.5 through 1.7
+ Make NAV compatible with Django 1.7
Changed in nav:
milestone: 4.3.0 → 4.4.0
Changed in nav:
assignee: Christian Strand Young (lizter) → Morten Brekkevold (mbrekkevold)
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

fix finally merged here: https://nav.uninett.no/hg/default/rev/32501f30524b

This should make NAV properly compatible with Debian Wheezy - BUT, Django 1.7 was deprecated by the Django dev team this Tuesday. I guess we should target Django 1.9 next, but at least 1.7 will be supported in Debian for a good while still.

Changed in nav:
status: In Progress → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.