#33283: Support for map function on `ModelAdmin.prepopulated_fields`
-----------------------------------------+------------------------
Reporter: riconnon | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: 4.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
When using `ModelAdmin.prepopulated_fields` to populate a field based on
entry into another field it would be very useful to be able to supply a
map function which modifies the value before pre-population.
My particular use-case, is to pre-populate a field using the filename of
the file being uploaded to a `FileField`, which using the current option
ends up including something like "cfakepath" as a prefix.
--
Ticket URL: <https://code.djangoproject.com/ticket/33283>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.3fab36f7dfc3cabe05adb0ce68c2e42e%40djangoproject.com.