Skip to content

Commit b8f79d2

Browse files
committed
Update dockerfile to install Django 2.x
1 parent 4d140d9 commit b8f79d2

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

dev/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ARG SOURCE_BRANCH
1515
# Build WireCloud wheel
1616
RUN git clone -b "${SOURCE_BRANCH}" --depth=1 --single-branch https://github.com/"${GITHUB_ACCOUNT}"/"${GITHUB_REPOSITORY}".git && \
1717
apt-get update && apt-get install -y gettext && \
18-
pip install "django<=1.11" && \
18+
pip install "django<=2.3" && \
1919
cd "${GITHUB_REPOSITORY}"/src && \
2020
python setup.py bdist_wheel
2121

@@ -49,7 +49,7 @@ RUN apt-get update && \
4949
pip install --no-cache-dir /dist/*.whl && \
5050
rm -rf /dist && \
5151
adduser --system --group --shell /bin/bash wirecloud && \
52-
pip install --no-cache-dir channels asgi_ipc asgi_redis asgi_rabbitmq wirecloud-keycloak && \
52+
pip install --no-cache-dir "channels<2.3" "channels-redis" "channels-rabbitmq" wirecloud-keycloak && \
5353
mkdir -p /opt/wirecloud_instance /var/www/static && \
5454
cd /opt && \
5555
wirecloud-admin startproject wirecloud_instance wirecloud_instance && \

dev/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import os
55
from wirecloud.commons.utils.conf import load_default_wirecloud_conf
6-
from django.core.urlresolvers import reverse_lazy
6+
from django.urls import reverse_lazy
77

88
DEBUG = os.environ.get("DEBUG", "False").strip().lower() == "true"
99
BASEDIR = os.path.dirname(os.path.abspath(__file__))

dev/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
admin.autodiscover()
1515

16-
login_method = django_auth.login
16+
login_method = django_auth.LoginView.as_view()
1717
if settings.IDM_AUTH == 'fiware':
1818
login_method = wc_fiware.login
1919

@@ -34,7 +34,7 @@
3434
url(r'^admin/logout/?$', wc_auth.logout),
3535

3636
# Admin interface
37-
url(r'^admin/', include(admin.site.urls)),
37+
url(r'^admin/', admin.site.urls),
3838
)
3939

4040
if settings.IDM_AUTH:

0 commit comments

Comments
 (0)