Django 2.0 support

Registered by Akihiro Motoki

Summary
=======
The goal of this blueprint is to make horizon work with Django 2.0.
We will support Django 1.11 (LTS) and Django 2.0+.

Motivation
========

Debian will switch the default Django version to 2.x soon. Although Django 2.0 is not LTS, it seems worth considering support of Django 2.0.

Apart from 1.11, Django 2.0 is the only release supported by Django community.
Django changes a lot release by release, so it sounds better to catch up with the changes as much as possible.

Description
=========

The following works are planned:

* Catch up with Django 2.0 features and handle removed interface in Django 2.0.
* More python 3 support. Django 2.0 requires python 3, and if we test more with Django 2.0 some modification for python 3 might be needed.
* Drop Django <= 1.10 support because Django 2.0+ and Django <=1.10 are not compatible. We will drop Django <=1.10 support in Queens, so it is not a problem. Precisely this is not a part of this blueprint.

UX
===
No UX impact.

Testing
======
Existing unit test covers the change. We will add py35dj20 tox env.

In addition, tox manage-py35dj20 env will be added so that we can use runserver with Django 2.0 easily.

Outside Dependencies
==================
Django 2.0 which was release this December.
The default version is kept to Django 1.11 (which is LTS).

Requirements Update Required
========================
The default version is kept to Django 1.11 so there is no g-r change required.

Doc Impact
=========
Needs to update the dependencies section in the installation guide (which is already obsolete now :/
https://docs.openstack.org/horizon/latest/install/from-source.html#system-requirements

Blueprint information

Status:
Complete
Approver:
Ying Zuo
Priority:
High
Drafter:
Akihiro Motoki
Direction:
Approved
Assignee:
Akihiro Motoki
Definition:
Approved
Series goal:
Accepted for 14.0.0-rocky
Implementation:
Implemented
Milestone target:
milestone icon rocky-1
Started by
Akihiro Motoki
Completed by
Akihiro Motoki

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#/q/topic:bp/django2-support

Addressed by: https://review.openstack.org/527319
    python3: long does not exist in python 3

Addressed by: https://review.openstack.org/527320
    django2: Replace django.core.urlresolves with django.urls

Addressed by: https://review.openstack.org/527321
    django2: Replace assignment_tag with simple_tag

Addressed by: https://review.openstack.org/527322
    django2: is_authenticated/is_anonymous is now property only

Addressed by: https://review.openstack.org/527323
    django2: Fix 3-tuple ImproperlyConfigured error

Addressed by: https://review.openstack.org/527924
    Make old django tests non-voting

Addressed by: https://review.openstack.org/528467
    django2: Drop SessionAuthenticationMiddleware

Addressed by: https://review.openstack.org/528468
    django2: adopt New-style middleware

Addressed by: https://review.openstack.org/528469
    Django2: Use new custom template loader interface

Addressed by: https://review.openstack.org/528476
    Suppress unnecessary logging output in UTs

Addressed by: https://review.openstack.org/528493
    Fix python 3 related test failures

Addressed by: https://review.openstack.org/528497
    Drop django.VERSION branches

[yingzuo - 2017/12/17] Can you use the template for new blueprints? https://blueprints.launchpad.net/horizon/+spec/template
[amotoki] I updated the description. Honestly I cannot find the new template when I created the blueprint. There is no reference in our contribution doc.....

[Dec 21, 2017 - amotoki] We discussed Django support plan in today's team meeting and Django 2.0 support is targeted to Rocky.
http://eavesdrop.openstack.org/meetings/horizon/2017/horizon.2017-12-20-20.00.log.html#l-39

Gerrit topic: https://review.openstack.org/#q,topic:bp/django2-support,n,z

Addressed by: https://review.openstack.org/553628
    Update Django versions in horizon requirements

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.