Skip to content

Commit

Permalink
Support for Django 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cwdavies authored Mar 19, 2020
2 parents fd8e9f8 + b3063db commit 4cfe1af
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
12 changes: 6 additions & 6 deletions ccdb5_ui/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
Generated by 'django-admin startproject' using Django 1.8.15.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
https://docs.djangoproject.com/en/stable/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
https://docs.djangoproject.com/en/stable/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
Expand All @@ -17,7 +17,7 @@


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

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get('SECRET_KEY', os.urandom(32))
Expand Down Expand Up @@ -65,13 +65,13 @@


# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
# https://docs.djangoproject.com/en/stable/ref/settings/#databases

DATABASES = {}


# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/
# https://docs.djangoproject.com/en/stable/topics/i18n/

LANGUAGE_CODE = 'en-us'

Expand All @@ -85,7 +85,7 @@


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

STATIC_URL = '/static/'

Expand Down
10 changes: 8 additions & 2 deletions ccdb5_ui/config/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
from django.conf.urls import url
from ccdb5_ui.views import CCDB5MainView


try:
from django.urls import re_path
except ImportError:
from django.conf.urls import url as re_path


urlpatterns = [
url(r'^.*$', CCDB5MainView.as_view()),
re_path(r'^.*$', CCDB5MainView.as_view()),
]
2 changes: 0 additions & 2 deletions ccdb5_ui/tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, unicode_literals

from django.test import RequestFactory, SimpleTestCase

from ccdb5_ui.views import CCDB5MainView
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
skipsdist=True
envlist=py{36}-dj{111}
envlist=py{36}-dj{111,22}

[testenv]
install_command=pip install -e ".[testing]" -U {opts} {packages}
Expand All @@ -15,3 +15,4 @@ basepython=
deps=
coverage==4.5.1
dj111: Django>=1.11,<1.12
dj22: Django>=2.2,<2.3

0 comments on commit 4cfe1af

Please sign in to comment.