|
@@ -22,7 +22,7 @@ class CreateImage(JSONResponseMixin, LoginRequiredMixin, CreateView): |
|
|
|
|
|
|
|
|
def form_valid(self, form): |
|
|
def form_valid(self, form): |
|
|
image = form.save() |
|
|
image = form.save() |
|
|
for size in settings.IMAGE_SIZES.keys(): |
|
|
|
|
|
|
|
|
for size in settings.IMAGE_SIZES: |
|
|
Thumbnail.objects.get_or_create_at_size(image.pk, size) |
|
|
Thumbnail.objects.get_or_create_at_size(image.pk, size) |
|
|
return self.render_json_response({ |
|
|
return self.render_json_response({ |
|
|
'success': { |
|
|
'success': { |
|
|