diff --git a/Dockerfile b/Dockerfile index 26847963..d35cc5c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,3 @@ -FROM debian -RUN apt-get update -RUN apt-get install -y default-libmysqlclient-dev gcc -RUN apt-get install -y postgresql postgresql-contrib libpq-dev python-psycopg2 -RUN apt-get update && apt-get install \ - -y --no-install-recommends python3 python3-virtualenv python3-dev -RUN apt-get update && apt-get install libssl-dev -RUN python3 -m virtualenv --python=/usr/bin/python3 /opt/venv -COPY ./requirements.txt /usr/src/app/ -WORKDIR /usr/src/app/ -RUN . /opt/venv/bin/activate && pip install -r requirements.txt +FROM rosti/python:3.6 +WORKDIR /srv/app/ COPY . . -EXPOSE 8000 -CMD ["python", "./manage.py", "runserver"] diff --git a/app.py b/app.py new file mode 100644 index 00000000..8d4b6fe1 --- /dev/null +++ b/app.py @@ -0,0 +1,10 @@ +#!/srv/bin/venv python3.6 +import os +import sys + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rowsandall_app.settings") + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() + +#execute_from_command_line(sys.argv) diff --git a/init.sh b/init.sh new file mode 100644 index 00000000..c93635f0 --- /dev/null +++ b/init.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +source /srv/venv/bin/activate +cd /srv/app +python manage.py migrate +python manage.py collectstatic --noinput +python manage.py runserver diff --git a/rowers/templates/embedded_video.html b/rowers/templates/embedded_video.html index 6bd67499..5543733b 100644 --- a/rowers/templates/embedded_video.html +++ b/rowers/templates/embedded_video.html @@ -40,6 +40,10 @@ $(this).removeAttr('disabled'); }); }); + document.getElementById("smallscreen").style.display = "none"; + if ($(window).width() <= 950) { + $("#smallscreen").show() + } }); + + + + + +{% endblock %} + +{% block main %} + + + +{% language 'en' %} +
Playing the video will advance the data in synchronization. Use the regular + YouTube controls to move around in the video and play it.
++ +
+ + +{% endlanguage %} + +{% endblock %} + +{% block sidebar %} +{% include 'menu_workout.html' %} +{% endblock %} diff --git a/rowers/urls.py b/rowers/urls.py index 2a9c39d6..5696c0d4 100644 --- a/rowers/urls.py +++ b/rowers/urls.py @@ -346,6 +346,8 @@ urlpatterns = [ re_path(r'^workout/(?P