Changeset - 40bbf747f9b1
[Not reviewed]
default
0 9 0
Branko Majic (branko) - 8 years ago 2017-12-22 10:12:55
branko@majic.rs
CONNT-25: Updating application and project to use Django 1.10.x:

- Bumped Django version in both development/testing requirements files
and in setup script.
- Synchronised the test project with template for Django 1.10.x.
- Removed unused (deprecated)
django.contrib.auth.middleware.SessionAuthenticationMiddleware
configuration option from the test project.
- Removed unused (deprecated) TEMPLATE_CONTEXT_PROCESSORS
configuration option.
- Updated release notes.
9 files changed with 30 insertions and 25 deletions:
0 comments (0 inline, 0 general)
docs/releasenotes.rst
Show inline comments
 
@@ -17,7 +17,7 @@ dev
 

	
 
Breaking changes:
 

	
 
* Django Conntrackt now depends on Django 1.8. In addition to official
 
* Django Conntrackt now depends on Django 1.10. In addition to official
 
  Django documentation, there is a dedicated upgrade guide that deals
 
  with the most basic installation.
 
  [ `CONNT-25 <https://projects.majic.rs/conntrackt/issues/CONNT-30>`_ ]
requirements/base.in
Show inline comments
 
@@ -24,7 +24,7 @@ django-braces~=1.12.0
 
django-crispy-forms~=1.6.0
 

	
 
# Web framework used by application.
 
django~=1.9.0
 
django~=1.10.0
 

	
 
# Library for programatic calculation of colours (contrasts,
 
# inversions etc).
requirements/development.txt
Show inline comments
 
@@ -11,7 +11,7 @@ chardet==3.0.4            # via requests
 
coverage==4.4.2
 
django-braces==1.12.0
 
django-crispy-forms==1.6.1
 
django==1.9.13
 
django==1.10.8
 
docutils==0.14            # via sphinx
 
factory-boy==2.1.2
 
funcsigs==1.0.2           # via mock
requirements/test.txt
Show inline comments
 
@@ -11,7 +11,7 @@ chardet==3.0.4            # via requests
 
coverage==4.4.2
 
django-braces==1.12.0
 
django-crispy-forms==1.6.1
 
django==1.9.13
 
django==1.10.8
 
docutils==0.14            # via sphinx
 
factory-boy==2.1.2
 
funcsigs==1.0.2           # via mock
setup.py
Show inline comments
 
@@ -26,7 +26,7 @@ README = open(os.path.join(os.path.dirna
 
INSTALL_REQUIREMENTS = [
 
    "django-braces~=1.12.0",
 
    "django-crispy-forms~=1.6.0",
 
    "django~=1.9.0",
 
    "django~=1.10.0",
 
    "palette~=0.2.0",
 
    "pydot~=1.2.0",
 
]
testproject/manage.py
Show inline comments
 
@@ -26,6 +26,20 @@ import sys
 
if __name__ == "__main__":
 
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.settings")
 

	
 
    from django.core.management import execute_from_command_line
 
    try:
 
        from django.core.management import execute_from_command_line
 
    except ImportError:
 
        # The above import may fail for some other reason. Ensure that the
 
        # issue is really that Django is missing to avoid masking other
 
        # exceptions on Python 2.
 
        try:
 
            import django
 
        except ImportError:
 
            raise ImportError(
 
                "Couldn't import Django. Are you sure it's installed and "
 
                "available on your PYTHONPATH environment variable? Did you "
 
                "forget to activate a virtual environment?"
 
            )
 
        raise
 

	
 
    execute_from_command_line(sys.argv)
testproject/testproject/settings.py
Show inline comments
 
@@ -22,10 +22,10 @@
 
Django settings for testproject project.
 

	
 
For more information on this file, see
 
https://docs.djangoproject.com/en/1.9/topics/settings/
 
https://docs.djangoproject.com/en/1.10/topics/settings/
 

	
 
For the full list of settings and their values, see
 
https://docs.djangoproject.com/en/1.9/ref/settings/
 
https://docs.djangoproject.com/en/1.10/ref/settings/
 
"""
 

	
 
import os
 
@@ -35,7 +35,7 @@ BASE_DIR = os.path.dirname(os.path.dirna
 

	
 

	
 
# Quick-start development settings - unsuitable for production
 
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
 
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
 

	
 
# SECURITY WARNING: keep the secret key used in production secret!
 
SECRET_KEY = '%s-x^wskhxu#5%o)0ck71g7o@7p18has!9_#(h(f@j@$97pcaw'
 
@@ -63,13 +63,12 @@ INSTALLED_APPS = [
 
     'crispy_forms',
 
]
 

	
 
MIDDLEWARE_CLASSES = [
 
MIDDLEWARE = [
 
    'django.middleware.security.SecurityMiddleware',
 
    'django.contrib.sessions.middleware.SessionMiddleware',
 
    'django.middleware.common.CommonMiddleware',
 
    'django.middleware.csrf.CsrfViewMiddleware',
 
    'django.contrib.auth.middleware.AuthenticationMiddleware',
 
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 
    'django.contrib.messages.middleware.MessageMiddleware',
 
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
 
]
 
@@ -96,7 +95,7 @@ WSGI_APPLICATION = 'testproject.wsgi.app
 

	
 

	
 
# Database
 
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
 
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
 

	
 
DATABASES = {
 
    'default': {
 
@@ -107,13 +106,13 @@ DATABASES = {
 

	
 

	
 
# Password validation
 
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
 
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
 
# Keep empty for test project to make life a bit easier.
 
AUTH_PASSWORD_VALIDATORS = []
 

	
 

	
 
# Internationalization
 
# https://docs.djangoproject.com/en/1.9/topics/i18n/
 
# https://docs.djangoproject.com/en/1.10/topics/i18n/
 

	
 
LANGUAGE_CODE = 'en-us'
 

	
 
@@ -127,16 +126,8 @@ USE_TZ = True
 

	
 

	
 
# Static files (CSS, JavaScript, Images)
 
# https://docs.djangoproject.com/en/1.9/howto/static-files/
 

	
 
# https://docs.djangoproject.com/en/1.10/howto/static-files/
 
STATIC_URL = '/static/'
 

	
 
# Extend the default TEMPLATE_CONTEXT_PROCESSORS to include the
 
# request as part of context (used throughout tests).
 
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
 
TEMPLATE_CONTEXT_PROCESSORS += (
 
    "django.core.context_processors.request",
 
)
 

	
 
# View that should be called for log-in action.
 
LOGIN_URL = "login"
testproject/testproject/urls.py
Show inline comments
 
@@ -22,7 +22,7 @@
 
"""testproject URL Configuration
 

	
 
The `urlpatterns` list routes URLs to views. For more information please see:
 
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
 
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
 
Examples:
 
Function views
 
    1. Add an import:  from my_app import views
testproject/testproject/wsgi.py
Show inline comments
 
@@ -24,7 +24,7 @@ WSGI config for testproject project.
 
It exposes the WSGI callable as a module-level variable named ``application``.
 

	
 
For more information on this file, see
 
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
 
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
 
"""
 

	
 
import os
0 comments (0 inline, 0 general)