Exemplo n.º 1
0
 def post(self, request,id, *args, **kwargs):
     file_image = Images()
     file_image.image = request.FILES['image']
     file_image.gallery = Images_Galleries.objects.get(pk=id)
     file_image.save()
     messages.success(request,_("Gallery Image Added"))
     return redirect('/admin/galleries/edit/%s'%id)
Exemplo n.º 2
0
 def post(self, request, *args, **kwargs):
     file_image = Images()
     file_image.image = request.FILES['image']
     file_image.save()
     messages.success(request,_("Image Added"))
     return redirect('/admin/galleries/images')