Sfoglia il codice sorgente

CreateImage.get should always return HttpResponse

tags/v1.0.0
Krzysztof Klimonda 11 anni fa
parent
commit
fbfd7e0239
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      pinry/core/views.py

+ 1
- 1
pinry/core/views.py Vedi File

@@ -21,7 +21,7 @@ class CreateImage(JSONResponseMixin, LoginRequiredMixin, CreateView):
def get(self, request, *args, **kwargs):
if not request.is_ajax():
return HttpResponseRedirect(reverse('core:recent-pins'))
super(CreateImage, self).get(request, *args, **kwargs)
return super(CreateImage, self).get(request, *args, **kwargs)

def form_valid(self, form):
image = form.save()


Caricamento…
Annulla
Salva