Removed unused View

This commit is contained in:
reverend 2020-08-30 16:54:11 +02:00
parent 2007b512c7
commit ca2eac533f

View File

@ -179,19 +179,6 @@ class PlaceDeleteView(IsAuthenticated, IsPlaceSubmitter, DeleteView):
def get_place(self):
return self.get_object()
class AlbumCreateView(IsAuthenticated, View):
def get(self, request, *args, **kwargs):
url = request.GET['url']
place_id = request.GET['place_id']
place = Place.objects.get(pk=place_id)
photo_album = PhotoAlbum()
photo_album.url = url
photo_album.place = place
photo_album.submitted_by = request.user
photo_album.save()
print(photo_album)
return redirect(reverse_lazy('place_detail', kwargs={'pk': place_id}))
class PhotoAlbumCreateView(IsAuthenticated, SuccessMessageMixin, CreateView):
model = PhotoAlbum
fields = ['url', 'label']