diff --git a/Dockerfile b/Dockerfile index 205b3d3..9977183 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,46 @@ # The first instruction is what image we want to base our container on # We Use an official Python runtime as a parent image -FROM python:3.6 +#FROM python:3.6 + +# FROM directive instructing base image to build upon +FROM python:3.6.6 # The enviroment variable ensures that the python output is set straight # to the terminal with out buffering it first -ENV PYTHONUNBUFFERED 1 +#ENV PYTHONUNBUFFERED 1 + +# App directory +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +# Install azure event hub client dependencies +#COPY p /usr/src/app/ + +# Bundle app source +COPY . /usr/src/app + +# COPY startup script into known file location in container +COPY start.sh /start.sh # create root directory for our project in the container -RUN mkdir /esther_kleinhenz_ba +#RUN mkdir /esther_kleinhenz_ba -# Set the working directory to /esther_kleinhenz_ba -WORKDIR /esther_kleinhenz_ba +# EXPOSE port 8000 to allow communication to/from server +#EXPOSE 8000 -# Copy the current directory contents into the container at /esther_kleinhenz_ba -ADD . /esther_kleinhenz_ba/ +RUN set -x \ + && buildDeps='curl gcc libc6-dev libsqlite3-dev libssl-dev make xz-utils zlib1g-dev' # Install any needed packages specified in requirements.txt -RUN pip install -r requirements.txt \ No newline at end of file +RUN pip install -r requirements.txt + +# Set the working directory to /esther_kleinhenz_ba +#WORKDIR /esther_kleinhenz_ba + +# CMD specifcies the command to execute to start the server running. +CMD ["/start.sh"] +# done! + +# Copy the current directory contents into the container at /esther_kleinhenz_ba +#ADD . /esther_kleinhenz_ba/ + diff --git a/application/forms.py b/application/forms.py index 724d9c5..9728e1a 100644 --- a/application/forms.py +++ b/application/forms.py @@ -16,7 +16,7 @@ class PostForm(forms.ModelForm): fields = ('title', 'text', 'published_date','tags') class NewTagForm(forms.ModelForm): - m_tags = TagField() + tags = TagField() class Meta: model = CustomUser - fields = ['m_tags'] + fields = ['tags'] diff --git a/application/templates/student_page.html b/application/templates/student_page.html index 231ccd1..8cc1c41 100644 --- a/application/templates/student_page.html +++ b/application/templates/student_page.html @@ -1,16 +1,6 @@ -{% extends "base.html" %} {% block content %} {% load taggit_templatetags2_tags %} {% get_taglist as tags for 'application.post'%} +{% extends "base.html" %} {% block content %} {% load taggit_templatetags2_tags %} +{% get_taglist as tags for 'application.post'%} -