title: How to update a ImageField from views in django
body: <p>Im a bit frustared trying to update a photo from a form. I have this:</p>
  
  <pre><code>&lt;form action="/subir-fotos/{{campana_id}}/{{point_id}}/" method="POST" enctype="multipart/form-data" id="form_tomaFoto{{page}}"&gt;{% csrf_token %}
  
  &lt;input type="hidden" value="{{i.titulo_foto.id}}" name="titulo"&gt;
  &lt;p&gt;&lt;input type="file" accept="image/*" name="foto" required&gt;&lt;/p&gt;
  
  &lt;p&gt;&lt;input type="submit" value="Enviar foto" class="boton"&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My model:</p>
  
  <pre><code>class InteraccionFotos(models.Model):
      campana = models.ForeignKey('dashboard.Campana')
      titulo_foto = models.ForeignKey('actividad_fotos.TitulosFotos')
      punto_interaccion = models.ForeignKey(PuntoInteraccion)
      foto = models.ImageField(upload_to='.',blank=True,null=True)
  </code></pre>
  
  <p>Then, in my View, I have this:</p>
  
  <pre><code>class SubeFotoView(FormView):
      form_class = FilebabyForm
      success_url = '/'
      template_name = 'tomar_fotos.html'
  
      def form_valid(self,form):
          form.save(commit=True)
          messages.success(self.request, 'File uploaded!')
          return super(SubeFotoView, self).form_valid(form)
  
  
      def post(self, request, *args, **kwargs):
          campana = self.kwargs.get('campana_id')
          point_id = self.kwargs.get('point_id')
          titulo_foto = request.POST['titulo']
          foto = request.FILES['foto']
          crea_foto = InteraccionFotos.objects.filter(pk=1,campana_id=3,punto_interaccion_id=5).update(foto=foto)
          data = {}
          data['success'] = "Foto subida con exitosamente"
          return HttpResponse(json.dumps(data), content_type='application/json')
  </code></pre>
  
  <p>As you can see in <code>crea_foto</code> variable I have a queryset where I made a filter and then update the field <code>foto</code>, but I can't get it works. Thing is if instead filter, I do a <code>create</code> queryset works fine and create the photo, in the admin if I upload from scratch or update a photo works fine too. Only happens with <code>update</code> queryset, any clue of how to solve it?</p>
  
  <p>PS: I'm using Boto, but since images are uploaded with other methods it is discarded that Boto be the problem.</p>