Ok, the problem then is, that my model has just a single entity called
picture.
What I'm trying to do is asociate multiple image files to multiple
`descriptions'.
I'm doing this by a intermedaite table:

#Images to be used in descriptions
class Image(models.Model):
    altText = models.CharField(maxlength = 128, null = True, blank =
True)
    picture = models.ImageField(upload_to='img/%Y/%m')
...

# Replaces the Many-to-Many Relationship
class ImageInDescription(models.Model):
    description = models.ForeignKey(Description,
edit_inline=models.TABULAR, num_in_admin=3)
    image = models.ForeignKey(Image, core = True)
...

#Descriptions
class Description(models.Model):
    lang = models.ForeignKey(Lang)
    description = models.TextField(null = True, blank = True)
...

That's it. So as you can see in the first class, `Image' is itself an
element to be uploaded. I guess I could add more ImageFields to the
model but that would't make sense, would it?

Isn't there a way to upload as many files as i want to (much like gmail
handles attatchments)
and then associating them to the descriptions?

Russell Keith-Magee wrote:
> On 8/29/06, cerealito <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi everyone,
> >
> >     I am trying to upload multiple image files in one of my projects.
> > Single-File upload works fine, but how do I Get to upload many files in
> > the same form?
>
> ...
>
> > But my question is... How do I "save" them?
> >
> > imageManipulator.do_html2python(new_data)
> > imageManipulator.save(new_data)
> >
> > Wouldn't work...
>
>
> It should do. As long as your model contains multiple FileField entries, the
> manipulator should quite happily save the files, one file per file field per
> form. Can you share your actual model, view and template (or pruned versions
> of them)?
>
> Yours,
> Russ Magee %-)
>
> ------=_Part_61688_22258181.1156811004015
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 1132
>
> <br><div><span class="gmail_quote">On 8/29/06, <b 
> class="gmail_sendername">cerealito</b> &lt;<a href="mailto:[EMAIL 
> PROTECTED]">[EMAIL PROTECTED]</a>&gt; wrote:</span><blockquote 
> class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 
> 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> <br>Hi everyone,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;I am trying to upload 
> multiple image files in one of my projects.<br>Single-File upload works fine, 
> but how do I Get to upload many files in<br>the same 
> form?</blockquote>...<br><blockquote class="gmail_quote" style="border-left: 
> 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> But my question is... How do I &quot;save&quot; 
> them?<br><br>imageManipulator.do_html2python(new_data)<br>imageManipulator.save(new_data)<br><br>Wouldn't
>  work...</blockquote><div><br>It should do.  As long as your model contains 
> multiple FileField entries, the manipulator should quite happily save the 
> files, one file per file field per form. Can you share your actual model, 
> view and template (or pruned versions of them)?
> <br></div><br></div>Yours,<br>Russ Magee %-)<br>
> 
> ------=_Part_61688_22258181.1156811004015--


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to