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
python:
- 2.7
- 3.4
- 3.5
branches:
only:
- master
......@@ -9,8 +9,8 @@ env:
global:
- DJANGO_SETTINGS_MODULE=sample_project.settings
matrix:
- DJANGO_VERSION=1.8.18
- DJANGO_VERSION=1.9.13
- DJANGO_VERSION=1.8
- DJANGO_VERSION=1.11
install:
- pip install flake8
- pip install -q Django==$DJANGO_VERSION
......
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf.urls import url
from django.views.generic import TemplateView
from codespeed import views
from codespeed.feeds import LatestEntries, LatestSignificantEntries
urlpatterns = patterns('',
urlpatterns = [
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
url(r'^feeds/latest/$', LatestEntries(), name='latest-results'),
url(r'^feeds/latest_significant/$', LatestSignificantEntries(),
name='latest-significant-results'),
)
]
urlpatterns += patterns('codespeed.views',
url(r'^reports/$', 'reports', name='reports'),
url(r'^changes/$', 'changes', name='changes'),
url(r'^changes/table/$', 'getchangestable', name='getchangestable'),
url(r'^changes/logs/$', 'displaylogs', name='displaylogs'),
url(r'^timeline/$', 'timeline', name='timeline'),
url(r'^timeline/json/$', 'gettimelinedata', name='gettimelinedata'),
url(r'^comparison/$', 'comparison', name='comparison'),
url(r'^comparison/json/$', 'getcomparisondata', name='getcomparisondata'),
url(r'^makeimage/$', 'makeimage', name='makeimage'),
)
urlpatterns += [
url(r'^reports/$', views.reports, name='reports'),
url(r'^changes/$', views.changes, name='changes'),
url(r'^changes/table/$', views.getchangestable, name='getchangestable'),
url(r'^changes/logs/$', views.displaylogs, name='displaylogs'),
url(r'^timeline/$', views.timeline, name='timeline'),
url(r'^timeline/json/$', views.gettimelinedata, name='gettimelinedata'),
url(r'^comparison/$', views.comparison, name='comparison'),
url(r'^comparison/json/$', views.getcomparisondata, name='getcomparisondata'),
url(r'^makeimage/$', views.makeimage, name='makeimage'),
]
urlpatterns += patterns('codespeed.views',
urlpatterns += [
# URLs for adding results
url(r'^result/add/json/$', 'add_json_results'),
url(r'^result/add/$', 'add_result'),
)
url(r'^result/add/json/$', views.add_json_results),
url(r'^result/add/$', views.add_result),
]
Django>=1.6,<1.10
Django>=1.7,<2.0
isodate>=0.4.7,<0.6
matplotlib>=1.4.3,<2.0
......@@ -3,7 +3,6 @@
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
BASEDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(BASEDIR)[1]
......@@ -39,10 +38,6 @@ ADMIN_MEDIA_PREFIX = '/static/admin/'
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 = (
'django.middleware.common.CommonMiddleware',
......@@ -54,24 +49,29 @@ MIDDLEWARE_CLASSES = (
ROOT_URLCONF = '{0}.urls'.format(TOPDIR)
TEMPLATE_DIRS = (
os.path.join(BASEDIR, 'templates'),
)
TEMPLATE_CONTEXT_PROCESSORS = (
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASEDIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.request',
)
],
},
},
]
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.staticfiles',
'codespeed',
......
# -*- coding: utf-8 -*-
import os.path
from django.conf import settings
from django.conf.urls import patterns, include
from django.views.generic import RedirectView
from django.core.urlresolvers import reverse
from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^', include('codespeed.urls')),
)
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('codespeed.urls'))
]
if settings.DEBUG:
# needed for development server
......
......@@ -9,7 +9,7 @@ setup(
download_url="https://github.com/tobami/codespeed/tags",
license='GNU Lesser General Public License version 2.1',
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']),
setup_requires=['setuptools-markdown'],
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