Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Make code installable and runnable under Ubuntu 20.04

Roland Geider13c56e3a6ed4
diff --git a/README.rst b/README.rst
index b55013087..2eab29186 100644
--- a/README.rst
+++ b/README.rst
@@ -68,12 +68,12 @@ and stable state.
::
- $ sudo apt-get install python3-dev python-virtualenv nodejs nodejs-legacy npm libjpeg8-dev zlib1g-dev git
+ $ sudo apt-get install python3-dev python-virtualenv nodejs npm libjpeg8-dev zlib1g-dev git
Then install the python packages from pypi in the virtualenv::
- $ virtualenv --python python3 venv-django
+ $ python3 -m venv venv-django
$ source venv-django/bin/activate
@@ -108,7 +108,7 @@ Stable version (from PyPI)
::
- $ sudo apt-get install python3-dev python-virtualenv nodejs nodejs-legacy npm libjpeg8-dev zlib1g-dev
+ $ sudo apt-get install python3-dev python-virtualenv nodejs npm libjpeg8-dev zlib1g-dev
$ virtualenv venv-django
$ source venv-django/bin/activate
$ pip install wger
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index d40ba9e91..e772627e6 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -29,7 +29,7 @@ contact page.
These are the necessary packages for both development and production
(node and npm are only used to download JS and CSS libraries)::
- sudo apt-get install nodejs nodejs-legacy npm git \
+ sudo apt-get install nodejs npm git \
python-virtualenv python3-dev \
libjpeg8-dev zlib1g-dev libwebp-dev
diff --git a/extras/docker/base/Dockerfile b/extras/docker/base/Dockerfile
index 3475b7e41..3bc6b92f1 100644
--- a/extras/docker/base/Dockerfile
+++ b/extras/docker/base/Dockerfile
@@ -14,7 +14,7 @@ MAINTAINER Roland Geider <[email protected]>
# Install dependencies
RUN apt-get update\
- && apt-get install -y nodejs nodejs-legacy npm git \
+ && apt-get install -y nodejs npm git \
python-virtualenv python3-dev \
libjpeg8-dev zlib1g-dev libwebp-dev \
sudo
diff --git a/package.json b/package.json
index f0a3d713d..8bf27f082 100644
--- a/package.json
+++ b/package.json
@@ -28,5 +28,8 @@
"eslint-plugin-react": "^6.1.2",
"gulp": "^3.9.1",
"gulp-eslint": "^3.0.1"
+ },
+ "dependencies": {
+ "bower": "^1.8.8"
}
}
diff --git a/requirements.txt b/requirements.txt
index 5b5d167ac..47e78cc2e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,7 +8,7 @@ django-bower
django-formtools>=2.0,<3.0
django-recaptcha
django-sortedm2m
-Django>=1.10,<1.11
+Django>=1.11,<1.12
django_compressor
django_mobile
easy-thumbnails
@@ -22,8 +22,8 @@ setuptools>=18.5
sphinx
# REST API
-django-cors-headers
-django-filter
+django-cors-headers==2.1.0
+django-filter==2.0.0
django-tastypie>=0.13,<0.14
djangorestframework>=3.4,<3.5
diff --git a/wger/__init__.py b/wger/__init__.py
index a2a092c17..6c87407c2 100644
--- a/wger/__init__.py
+++ b/wger/__init__.py
@@ -5,7 +5,7 @@
:license: GNU GPL, see LICENSE for more details.
"""
-VERSION = (1, 9, 0, 'alpha', 1)
+VERSION = (1, 9, 0, 'alpha', 2)
RELEASE = False
diff --git a/wger/core/forms.py b/wger/core/forms.py
index 491856639..a8c5e646c 100644
--- a/wger/core/forms.py
+++ b/wger/core/forms.py
@@ -140,7 +140,7 @@ class RegistrationForm(UserCreationForm, UserEmailForm):
# randomly one of the application languages. This also appears to happen
# only on wger.de, perhaps because there the application is behind a reverse
# proxy. See #281.
- captcha = ReCaptchaField(attrs={'theme': 'clean', 'lang': 'en'},
+ captcha = ReCaptchaField(#attrs={'theme': 'clean', 'lang': 'en'},
label=_('Confirmation text'),
help_text=_('As a security measure, please enter the previous words'))
@@ -178,6 +178,6 @@ class FeedbackAnonymousForm(FeedbackRegisteredForm):
'''
Feedback form used for anonymous users (has additionally a reCaptcha field)
'''
- captcha = ReCaptchaField(attrs={'theme': 'clean'},
+ captcha = ReCaptchaField(#attrs={'theme': 'clean'},
label=_('Confirmation text'),
help_text=_('As a security measure, please enter the previous words'),)
diff --git a/wger/manager/forms.py b/wger/manager/forms.py
index 3bce31efe..89b095e4d 100644
--- a/wger/manager/forms.py
+++ b/wger/manager/forms.py
@@ -60,7 +60,7 @@ from wger.utils.widgets import (
class DemoUserForm(Form):
- captcha = ReCaptchaField(attrs={'theme': 'clean'},
+ captcha = ReCaptchaField(#attrs={'theme': 'clean'},
label=_('Confirmation text'),
help_text=_('As a security measure, please enter the previous words'),)
diff --git a/wger/settings.tpl b/wger/settings.tpl
index 9da3fc41a..98c292918 100644
--- a/wger/settings.tpl
+++ b/wger/settings.tpl
@@ -24,6 +24,9 @@ DATABASES = {{
}}
}}
+# Timezone for this installation. Consult settings_global.py for more information
+TIME_ZONE = 'Europe/Berlin'
+
# Make this unique, and don't share it with anybody.
SECRET_KEY = '{default_key}'
diff --git a/wger/settings_global.py b/wger/settings_global.py
index b762ae2ae..090ae7813 100644
--- a/wger/settings_global.py
+++ b/wger/settings_global.py
@@ -217,7 +217,7 @@ USE_L10N = True
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
-TIME_ZONE = None
+TIME_ZONE = 'Europe/Berlin'
# Restrict the available languages
LANGUAGES = (
diff --git a/wger/utils/widgets.py b/wger/utils/widgets.py
index 37a67ea4a..c1e30531d 100644
--- a/wger/utils/widgets.py
+++ b/wger/utils/widgets.py
@@ -23,9 +23,8 @@ from itertools import chain
# Third Party
from django.forms import fields
from django.forms.widgets import (
- CheckboxChoiceInput,
+ CheckboxInput,
CheckboxSelectMultiple,
- ChoiceFieldRenderer,
DateInput,
Select,
SelectMultiple,
@@ -150,7 +149,7 @@ class ExerciseAjaxSelect(SelectMultiple):
return ''
-class CheckboxChoiceInputTranslated(CheckboxChoiceInput):
+class CheckboxChoiceInputTranslated(CheckboxInput):
'''
Overwritten CheckboxChoiceInput
@@ -164,7 +163,7 @@ class CheckboxChoiceInputTranslated(CheckboxChoiceInput):
super(CheckboxChoiceInputTranslated, self).__init__(name, value, attrs, choice, index)
-class CheckboxChoiceInputTranslatedOriginal(CheckboxChoiceInput):
+class CheckboxChoiceInputTranslatedOriginal(CheckboxInput):
'''
Overwritten CheckboxChoiceInput
@@ -186,30 +185,32 @@ class CheckboxChoiceInputTranslatedOriginal(CheckboxChoiceInput):
index)
-class CheckboxFieldRendererTranslated(ChoiceFieldRenderer):
- choice_input_class = CheckboxChoiceInputTranslated
+#class CheckboxFieldRendererTranslated(ChoiceFieldRenderer):
+ #choice_input_class = CheckboxChoiceInputTranslated
-class CheckboxFieldRendererTranslatedOriginal(ChoiceFieldRenderer):
- choice_input_class = CheckboxChoiceInputTranslatedOriginal
+#class CheckboxFieldRendererTranslatedOriginal(ChoiceFieldRenderer):
+# choice_input_class = CheckboxChoiceInputTranslatedOriginal
-class CheckboxBootstrapRenderer(CheckboxFieldRendererTranslated):
- outer_html = u'<div{id_attr}>{content}</div>'
- inner_html = u'<div class="checkbox">{choice_value}{sub_widgets}</div>'
+#class CheckboxBootstrapRenderer(CheckboxFieldRendererTranslated):
+# outer_html = u'<div{id_attr}>{content}</div>'
+# inner_html = u'<div class="checkbox">{choice_value}{sub_widgets}</div>'
-class CheckboxBootstrapRendererTranslatedOriginal(CheckboxFieldRendererTranslatedOriginal):
- outer_html = u'<div{id_attr}>{content}</div>'
- inner_html = u'<div class="checkbox">{choice_value}{sub_widgets}</div>'
+#class CheckboxBootstrapRendererTranslatedOriginal(CheckboxFieldRendererTranslatedOriginal):
+# outer_html = u'<div{id_attr}>{content}</div>'
+# inner_html = u'<div class="checkbox">{choice_value}{sub_widgets}</div>'
class BootstrapSelectMultiple(CheckboxSelectMultiple):
- renderer = CheckboxBootstrapRenderer
+ pass
+ #renderer = CheckboxBootstrapRenderer
class BootstrapSelectMultipleTranslatedOriginal(CheckboxSelectMultiple):
- renderer = CheckboxBootstrapRendererTranslatedOriginal
+ pass
+ #renderer = CheckboxBootstrapRendererTranslatedOriginal
class TranslatedSelectMultiple(BootstrapSelectMultiple):