Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from Kobold/django-110-fixes
Fixes for Django 1.10 compatibility
- Loading branch information
Showing
5 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
from django.contrib import admin | ||
from django.conf.urls import patterns, include, url | ||
from django.conf.urls import include, url | ||
from django.views.generic import TemplateView | ||
|
||
admin.autodiscover() | ||
|
||
urlpatterns = patterns('', | ||
urlpatterns = [ | ||
url(r'experiments/', include('experiments.urls')), | ||
url(r'admin/', include(admin.site.urls)), | ||
url(r'^$', TemplateView.as_view(template_name="test_page.html"), name="test_page"), | ||
url(r'^goal/$', TemplateView.as_view(template_name="goal.html"), name="goal"), | ||
) | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from experiments.urls import urlpatterns | ||
from django.conf.urls import patterns, include | ||
from django.conf.urls import include, url | ||
from django.contrib import admin | ||
|
||
|
||
urlpatterns += patterns('', | ||
(r'^admin/', include(admin.site.urls)), | ||
) | ||
urlpatterns += [ | ||
url(r'^admin/', include(admin.site.urls)), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from django.conf.urls import patterns, url | ||
from django.conf.urls import url | ||
from experiments import views | ||
|
||
urlpatterns = patterns('experiments.views', | ||
url(r'^goal/(?P<goal_name>[^/]+)/(?P<cache_buster>[^/]+)?$', 'record_experiment_goal', name="experiment_goal"), | ||
url(r'^confirm_human/$', 'confirm_human', name="experiment_confirm_human"), | ||
url(r'^change_alternative/(?P<experiment_name>[a-zA-Z0-9-_]+)/(?P<alternative_name>[a-zA-Z0-9-_]+)/$', 'change_alternative', name="experiment_change_alternative"), | ||
) | ||
urlpatterns = [ | ||
url(r'^goal/(?P<goal_name>[^/]+)/(?P<cache_buster>[^/]+)?$', views.record_experiment_goal, name="experiment_goal"), | ||
url(r'^confirm_human/$', views.confirm_human, name="experiment_confirm_human"), | ||
url(r'^change_alternative/(?P<experiment_name>[a-zA-Z0-9-_]+)/(?P<alternative_name>[a-zA-Z0-9-_]+)/$', views.change_alternative, name="experiment_change_alternative"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[tox] | ||
envlist = py27-django{17,18,19,110} | ||
|
||
[testenv] | ||
commands = python testrunner.py | ||
deps = | ||
django17: Django < 1.8 | ||
django18: Django < 1.9 | ||
django19: Django < 1.10 | ||
django110: Django < 1.11 |