#31725: Setting ImageField and FileField default to a static file
-------------------------------------+-------------------------------------
Reporter: Daniel González | Owner: nobody
Fernández |
Type: New feature | Status: new
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: static image | Triage Stage:
default | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Alexandr Tatarinov):
I am not sure this should be solved on the model level, because IMHO it is
related to the presentation level, so I would suggest solving this on
Form/Template level.
When using i.e. DRF I would place `get_avatar` in the serializer and use
`SerializerMethodField`. Also, I believe this can be solved on an
individual codebase level without the need to integrate into Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/31725#comment:1>
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/068.9bbef916dd04a6fc103c0793d14c7267%40djangoproject.com.