Commit 7ca36b84 authored by Miquel Torres's avatar Miquel Torres
Browse files

Remove usage of pattern in urls.py to be compatible with Django 1.10

- Set travis matrix to Python 3.5 and Django 1.11
- Set max django version to 1.11 in requirements and setup.py
parent cd75999b
language: python language: python
python: python:
- 2.7 - 2.7
- 3.4 - 3.5
branches: branches:
only: only:
- master - master
...@@ -9,8 +9,8 @@ env: ...@@ -9,8 +9,8 @@ env:
global: global:
- DJANGO_SETTINGS_MODULE=sample_project.settings - DJANGO_SETTINGS_MODULE=sample_project.settings
matrix: matrix:
- DJANGO_VERSION=1.8.18 - DJANGO_VERSION=1.8
- DJANGO_VERSION=1.9.13 - DJANGO_VERSION=1.11
install: install:
- pip install flake8 - pip install flake8
- pip install -q Django==$DJANGO_VERSION - pip install -q Django==$DJANGO_VERSION
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url from django.conf.urls import url
from django.views.generic import TemplateView from django.views.generic import TemplateView
from codespeed import views
from codespeed.feeds import LatestEntries, LatestSignificantEntries from codespeed.feeds import LatestEntries, LatestSignificantEntries
urlpatterns = [
urlpatterns = patterns('',
url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'), url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'),
url(r'^about/$', TemplateView.as_view(template_name='about.html'), name='about'), url(r'^about/$',
TemplateView.as_view(template_name='about.html'), name='about'),
# RSS for reports # RSS for reports
url(r'^feeds/latest/$', LatestEntries(), name='latest-results'), url(r'^feeds/latest/$', LatestEntries(), name='latest-results'),
url(r'^feeds/latest_significant/$', LatestSignificantEntries(), url(r'^feeds/latest_significant/$', LatestSignificantEntries(),
name='latest-significant-results'), name='latest-significant-results'),
) ]
urlpatterns += patterns('codespeed.views', urlpatterns += [
url(r'^reports/$', 'reports', name='reports'), url(r'^reports/$', views.reports, name='reports'),
url(r'^changes/$', 'changes', name='changes'), url(r'^changes/$', views.changes, name='changes'),
url(r'^changes/table/$', 'getchangestable', name='getchangestable'), url(r'^changes/table/$', views.getchangestable, name='getchangestable'),
url(r'^changes/logs/$', 'displaylogs', name='displaylogs'), url(r'^changes/logs/$', views.displaylogs, name='displaylogs'),
url(r'^timeline/$', 'timeline', name='timeline'), url(r'^timeline/$', views.timeline, name='timeline'),
url(r'^timeline/json/$', 'gettimelinedata', name='gettimelinedata'), url(r'^timeline/json/$', views.gettimelinedata, name='gettimelinedata'),
url(r'^comparison/$', 'comparison', name='comparison'), url(r'^comparison/$', views.comparison, name='comparison'),
url(r'^comparison/json/$', 'getcomparisondata', name='getcomparisondata'), url(r'^comparison/json/$', views.getcomparisondata, name='getcomparisondata'),
url(r'^makeimage/$', 'makeimage', name='makeimage'), url(r'^makeimage/$', views.makeimage, name='makeimage'),
) ]
urlpatterns += patterns('codespeed.views', urlpatterns += [
# URLs for adding results # URLs for adding results
url(r'^result/add/json/$', 'add_json_results'), url(r'^result/add/json/$', views.add_json_results),
url(r'^result/add/$', 'add_result'), url(r'^result/add/$', views.add_result),
) ]
Django>=1.6,<1.10 Django>=1.7,<2.0
isodate>=0.4.7,<0.6 isodate>=0.4.7,<0.6
matplotlib>=1.4.3,<2.0 matplotlib>=1.4.3,<2.0
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
import os import os
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG
BASEDIR = os.path.abspath(os.path.dirname(__file__)) BASEDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(BASEDIR)[1] TOPDIR = os.path.split(BASEDIR)[1]
...@@ -39,10 +38,6 @@ ADMIN_MEDIA_PREFIX = '/static/admin/' ...@@ -39,10 +38,6 @@ ADMIN_MEDIA_PREFIX = '/static/admin/'
SECRET_KEY = 'as%n_m#)^vee2pe91^^@c))sl7^c6t-9r8n)_69%)2yt+(la2&' SECRET_KEY = 'as%n_m#)^vee2pe91^^@c))sl7^c6t-9r8n)_69%)2yt+(la2&'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
...@@ -54,24 +49,29 @@ MIDDLEWARE_CLASSES = ( ...@@ -54,24 +49,29 @@ MIDDLEWARE_CLASSES = (
ROOT_URLCONF = '{0}.urls'.format(TOPDIR) ROOT_URLCONF = '{0}.urls'.format(TOPDIR)
TEMPLATE_DIRS = (
os.path.join(BASEDIR, 'templates'),
)
TEMPLATE_CONTEXT_PROCESSORS = ( TEMPLATES = [
'django.contrib.auth.context_processors.auth', {
'django.contrib.messages.context_processors.messages', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'django.core.context_processors.debug', 'DIRS': [os.path.join(BASEDIR, 'templates')],
'django.core.context_processors.i18n', 'APP_DIRS': True,
'django.core.context_processors.media', 'OPTIONS': {
'django.core.context_processors.static', 'context_processors': [
'django.core.context_processors.request', 'django.template.context_processors.debug',
) 'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
INSTALLED_APPS = ( INSTALLED_APPS = (
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'codespeed', 'codespeed',
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os.path
from django.conf import settings from django.conf import settings
from django.conf.urls import patterns, include from django.conf.urls import include, url
from django.views.generic import RedirectView
from django.core.urlresolvers import reverse
from django.contrib import admin from django.contrib import admin
admin.autodiscover() urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
urlpatterns = patterns('', url(r'^', include('codespeed.urls'))
(r'^admin/', include(admin.site.urls)), ]
(r'^', include('codespeed.urls')),
)
if settings.DEBUG: if settings.DEBUG:
# needed for development server # needed for development server
......
...@@ -9,7 +9,7 @@ setup( ...@@ -9,7 +9,7 @@ setup(
download_url="https://github.com/tobami/codespeed/tags", download_url="https://github.com/tobami/codespeed/tags",
license='GNU Lesser General Public License version 2.1', license='GNU Lesser General Public License version 2.1',
keywords=['benchmarking', 'visualization'], keywords=['benchmarking', 'visualization'],
install_requires=['django>=1.6,<1.10', 'isodate>=0.4.7,<0.6', 'matplotlib>=1.4.3,<2.0'], install_requires=['django>=1.8,<2.0', 'isodate>=0.4.7,<0.6', 'matplotlib>=1.4.3,<2.0'],
packages=find_packages(exclude=['ez_setup', 'sample_project']), packages=find_packages(exclude=['ez_setup', 'sample_project']),
setup_requires=['setuptools-markdown'], setup_requires=['setuptools-markdown'],
long_description_markdown_filename='README.md', long_description_markdown_filename='README.md',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment