Self hosted FLOSS fitness/workout, nutrition and weight tracker
Update code to be compatible with django 1.10
Roland Geider4cee67e40e77
diff --git a/requirements.txt b/requirements.txtindex 50bd2a341..4ad94c39a 100644--- a/requirements.txt+++ b/requirements.txt@@ -2,7 +2,7 @@# Requirements for wger for production#-Django>=1.9,<1.10+Django>=1.10,<1.11django-recaptchareportlabdjango_mobile@@ -21,7 +21,7 @@ invokerequests# REST API-djangorestframework>=3.2,<3.3+djangorestframework>=3.4,<3.5django-filterdjango-tastypiedjango-cors-headersdiff --git a/wger/config/urls.py b/wger/config/urls.pyindex 2f4df0c60..3b6e15eb5 100644--- a/wger/config/urls.py+++ b/wger/config/urls.py@@ -15,7 +15,7 @@# You should have received a copy of the GNU Affero General Public License# along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.-from django.conf.urls import patterns, url, include+from django.conf.urls import url, includefrom wger.config.views import language_configfrom wger.config.views import gym_configdiff --git a/wger/core/urls.py b/wger/core/urls.pyindex 532b70d2b..0a2177462 100644--- a/wger/core/urls.py+++ b/wger/core/urls.py@@ -16,7 +16,6 @@from django.conf.urls import (- patterns,url,include)diff --git a/wger/exercises/urls.py b/wger/exercises/urls.pyindex ca4b04c8c..29d4582ff 100644--- a/wger/exercises/urls.py+++ b/wger/exercises/urls.py@@ -15,7 +15,7 @@# You should have received a copy of the GNU Affero General Public License# along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.-from django.conf.urls import patterns, url, include+from django.conf.urls import url, includefrom django.contrib.auth.decorators import login_requiredfrom wger.exercises.views import (diff --git a/wger/manager/urls.py b/wger/manager/urls.pyindex 9de289b5e..e8a50d662 100644--- a/wger/manager/urls.py+++ b/wger/manager/urls.py@@ -15,7 +15,7 @@# You should have received a copy of the GNU Affero General Public License# along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.-from django.conf.urls import patterns, url, include+from django.conf.urls import url, includefrom django.contrib.auth.decorators import login_requiredfrom wger.manager.views import (diff --git a/wger/nutrition/templates/bmi/form.html b/wger/nutrition/templates/bmi/form.htmlindex b756dc952..d0626bbd0 100644--- a/wger/nutrition/templates/bmi/form.html+++ b/wger/nutrition/templates/bmi/form.html@@ -26,14 +26,14 @@ div.bmi-legend {<script>$(document).ready(function () {- wgerRenderBodyMassIndex({% if flavour = 'mobile'%}$('#content').width() * 0.95{% endif %});+ wgerRenderBodyMassIndex({% if flavour == 'mobile'%}$('#content').width() * 0.95{% endif %});/** Process the form*/$("#bmi-form").click(function(e){e.preventDefault();- wgerRenderBodyMassIndex({% if flavour = 'mobile'%}$('#content').width() * 0.95{% endif %});+ wgerRenderBodyMassIndex({% if flavour == 'mobile'%}$('#content').width() * 0.95{% endif %});});});diff --git a/wger/nutrition/urls.py b/wger/nutrition/urls.pyindex d768fc3f4..3da3389e9 100644--- a/wger/nutrition/urls.py+++ b/wger/nutrition/urls.py@@ -17,7 +17,6 @@from django.contrib.auth.decorators import login_requiredfrom django.conf.urls import (- patterns,url,include)diff --git a/wger/settings_global.py b/wger/settings_global.pyindex abba0a87b..85d165abc 100644--- a/wger/settings_global.py+++ b/wger/settings_global.py@@ -168,6 +168,11 @@ TEMPLATES = [},]+# TODO: Temporary fix for django 1.10 and the django-mobile app. If issue #72+# is closed, this can be removed.+# https://github.com/gregmuellegger/django-mobile/issues/72+TEMPLATE_LOADERS = TEMPLATES[0]['OPTIONS']['loaders']+# Store the user messages in the sessionMESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'diff --git a/wger/weight/urls.py b/wger/weight/urls.pyindex 6e0767f29..2c7e252e8 100644--- a/wger/weight/urls.py+++ b/wger/weight/urls.py@@ -15,7 +15,7 @@# You should have received a copy of the GNU Affero General Public License# along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.-from django.conf.urls import patterns, url+from django.conf.urls import urlfrom django.contrib.auth.decorators import login_requiredfrom wger.weight.forms import WeightCsvImportForm