#25756: ArrayField does not work with FileField
----------------------------------+------------------------------------
Reporter: adongy | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Comment (by riccardodivirgilio):
Hi, I'm implementing an ArrayField and I can attach a "working" and very
dirty implementation.
So far I found several problems:
1. If you use a FileField this field is using a descriptor to transform
strings into File objects, which is why the array field is always
returning strings and not file objects.
2. The save method of FileField is setting the instance file attribute to
a file, which in this case is wrong because it should be a list of files.
3. the pre save method in file field is the one that is actually saving
the file.
--
Ticket URL: <https://code.djangoproject.com/ticket/25756#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.1462f328c643a55a103e8cd5f09fdb57%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.