Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Update and test django 1.8

Roland Geidere343f962301f
diff --git a/.travis.yml b/.travis.yml
index 4fb66f335..b29a2b9bd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,10 +14,10 @@ python:
# Manually define here the combinations environment variables to test
# https://github.com/travis-ci/travis-ci/issues/1519
env:
- - DJANGO_VERSION=1.7.10 TEST_MOBILE=True DB=postgresql
- - DJANGO_VERSION=1.7.10 TEST_MOBILE=True DB=sqlite
- - DJANGO_VERSION=1.7.10 TEST_MOBILE=False DB=postgresql
- - DJANGO_VERSION=1.7.10 TEST_MOBILE=False DB=sqlite
+ - DJANGO_VERSION=1.8.4 TEST_MOBILE=True DB=postgresql
+ - DJANGO_VERSION=1.8.4 TEST_MOBILE=True DB=sqlite
+ - DJANGO_VERSION=1.8.4 TEST_MOBILE=False DB=postgresql
+ - DJANGO_VERSION=1.8.4 TEST_MOBILE=False DB=sqlite
# Install the application
install:
diff --git a/requirements.txt b/requirements.txt
index 47fda29e1..313c68a7e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,11 +2,12 @@
# Requirements for wger for production
#
-Django>=1.7,<1.8
+Django>=1.8,<1.9
django-browserid==0.11
django-recaptcha
reportlab
django_mobile
+django-formtools
bleach
python-mimeparse
pillow
diff --git a/wger/weight/views.py b/wger/weight/views.py
index cf4ddd03a..b4c3c8bc1 100644
--- a/wger/weight/views.py
+++ b/wger/weight/views.py
@@ -24,7 +24,6 @@ from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.contrib.auth.decorators import login_required
-from django.contrib.formtools.preview import FormPreview
from django.utils import formats
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy
@@ -32,13 +31,16 @@ from django.db.models import Min
from django.db.models import Max
from django.views.generic import CreateView
from django.views.generic import UpdateView
+
from rest_framework.response import Response
from rest_framework.decorators import api_view
-from wger.utils.helpers import check_access
+
+from formtools.preview import FormPreview
from wger.weight.forms import WeightForm
from wger.weight.models import WeightEntry
from wger.weight import helpers
+from wger.utils.helpers import check_access
from wger.utils.generic_views import WgerFormMixin