Hi guys!

I have the following models:

class Product(models.Model):
    data = models.TextField()

    class Admin:
        pass

class Photo(models.Model):
     product = models.ForeignKey(Product, edit_inline=models.TABULAR)
     file = models.ImageField(upload_to='', core=True)
     description = models.CharField(blank=True)

My goal is permit the user to add a product and some set of pictures
at same time. My problem is that using a file field and django gets
confused about it. When I add and object, django insert 3 images, if
the filename is missing, it gets a blank string. When I try to edit
this object (product), django can't add any more photo.

I think on a way to have a checkbox that controls the removal of the
photo, if it isn't checked, I don't remove the photo, if it is
checked, I remove the photo. Is there a way to accomplish such task?
Did someone get troubles like this?

Thanks in advance!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to