From 2346f814e7d7ff730229893f23be8fa34ee49784 Mon Sep 17 00:00:00 2001 From: reverend Date: Tue, 4 Aug 2020 20:04:46 +0200 Subject: [PATCH] Removed debug --- lostplaces/lostplaces_app/forms.py | 2 +- lostplaces/lostplaces_app/views.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lostplaces/lostplaces_app/forms.py b/lostplaces/lostplaces_app/forms.py index 7e1d942..6472aeb 100644 --- a/lostplaces/lostplaces_app/forms.py +++ b/lostplaces/lostplaces_app/forms.py @@ -45,5 +45,5 @@ class PlaceImageCreateForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - print(self.fields) + self.fields['filename'].required = False diff --git a/lostplaces/lostplaces_app/views.py b/lostplaces/lostplaces_app/views.py index 0949495..64062cb 100644 --- a/lostplaces/lostplaces_app/views.py +++ b/lostplaces/lostplaces_app/views.py @@ -31,7 +31,6 @@ def hello_world(request): class HomeView(View): def get(self, request, *args, **kwargs): place_list = Place.objects.all().order_by('submitted_when')[:10] - print(place_list) context = { 'place_list': place_list } @@ -84,9 +83,7 @@ class PlaceCreateView(View): } return render(request, 'create_place.html', context) - def _apply_multipart_image_upload(self, files, place, submitter): - print(files) - for image in files: + def _apply_multipart_image_upload(self, files, place, submitter):: place_image = PlaceImage.objects.create( filename=image, place=place,