diff --git a/Dockerfile b/Dockerfile index 0d2eb8f..0bc5946 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,16 @@ WORKDIR /root RUN python3 -m ensurepip RUN pip3 install -U pip --no-cache-dir +COPY app/requirements.txt . +RUN pip3 install -r requirements.txt --no-cache-dir + COPY app /opt/polyphonic WORKDIR /opt/polyphonic COPY docker_settings.py polyphonic/local_settings.py -RUN pip3 install -r requirements.txt --no-cache-dir - RUN mkdir /var/polyphonic RUN SECRET_KEY=_ python3 manage.py collectstatic --noinput ENTRYPOINT ["python3", "manage.py"] -CMD ["runserver", "0.0.0.0:8000", "--insecure"] \ No newline at end of file +CMD ["runserver", "0.0.0.0:8000", "--insecure"] diff --git a/app/interface/templates/interface/project_base.html b/app/interface/templates/interface/project_base.html index 4ee91af..3e23e43 100644 --- a/app/interface/templates/interface/project_base.html +++ b/app/interface/templates/interface/project_base.html @@ -43,7 +43,7 @@
Admin
+ {% for tag in collection.tags %} + {{ tag }} + {% endfor %} + {% for genre in collection.genres %} + {{ genre }} + {% endfor %} +
{% firstof work.composer "Unattributed" %}{% if work.edition %} - {{ work.edition }}{% endif %}
@@ -30,10 +30,10 @@
Location: {{ work.collection }} [{{ work.identifier }}]
- Running time: {{ work.duration }}
+ Running time: {% firstof work.duration 'Unknown' %}
Licence: {{ work.get_licence_display }}
{% for meta in work.meta %}
- {{ meta.get_name_display }}: {{ meta.value }}
+ {{ meta.get_name_display }}: {{ meta.value }}
{% endfor %}
No digital parts available
{% endfor %} diff --git a/app/library/urls.py b/app/library/urls.py index 8d60828..2decdd4 100644 --- a/app/library/urls.py +++ b/app/library/urls.py @@ -1,8 +1,15 @@ -from django.urls import path +from django.urls import path, include from django.contrib.auth import views as auth_views +from rest_framework import routers from . import views +from library.views import api + +#router = routers.DefaultRouter() +#router.register(r'collection', external.CollectionViewSet, basename="collection") +#router.register(r'work', external.WorkViewSet, basename="work") + urlpatterns = [ path('projects/