On 8/14/06, Vizcayno <[EMAIL PROTECTED]> wrote:

> When I save a first record including main and additional attachments
> and then I verify the results of the saving, all goes well; if I change
> the content of some data in the MaeDocs table (nom-doc for example) and
> save the changes, when verifying the record again I can see that the
> secondary attachment files disappeared. Checking the History of the
> record, it indicates that the secondary attachments were effectively
> replaced by ' '. How can I avoid this situation?

At the moment, FileFields don't work the way you expect when you give
them the attribute "core=True". If they are the only core field in
your model, you'll see all sorts of strange behaviour.

The only workaround I know of, at the moment, is to add another field
to your OthAttachs model, say, a caption or description field, and
make it "core=True", instead of the FileField. Then you need to tell
anyone who uses the admin pages that they have to enter a description
for each file attachment, and if they remove the description, the file
will be deleted.

I opened a ticket a few days ago, with a patch to address this problem
( http://code.djangoproject.com/ticket/2534 ). If this patch is
applied to the django source, then your models will work as you expect
them to.


-- 
Regards,
Ian Clelland
<[EMAIL PROTECTED]>

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