diff --git a/argocd/deployment.yaml b/argocd/deployment.yaml index 3e2327a..9f6cc54 100644 --- a/argocd/deployment.yaml +++ b/argocd/deployment.yaml @@ -27,7 +27,7 @@ spec: mountPath: /data containers: - name: web - image: git.baumann.gr/adebaumann/labhelper:0.041 + image: git.baumann.gr/adebaumann/labhelper:0.042 imagePullPolicy: Always ports: - containerPort: 8000 diff --git a/boxes/forms.py b/boxes/forms.py index c5a8093..b76569a 100644 --- a/boxes/forms.py +++ b/boxes/forms.py @@ -16,6 +16,14 @@ class ThingForm(forms.ModelForm): } +class ThingPictureForm(forms.ModelForm): + """Form for uploading/changing a Thing picture.""" + + class Meta: + model = Thing + fields = ('picture',) + + ThingFormSet = forms.modelformset_factory( Thing, form=ThingForm, diff --git a/boxes/templates/boxes/thing_detail.html b/boxes/templates/boxes/thing_detail.html index f3a2177..4953dcf 100644 --- a/boxes/templates/boxes/thing_detail.html +++ b/boxes/templates/boxes/thing_detail.html @@ -30,6 +30,24 @@ {% endif %} + +
+ {% csrf_token %} + +
+ + {% if thing.picture %} + + {% endif %} +
+
@@ -68,6 +86,7 @@
{% csrf_token %} +