#21744: Dinamic creation of forms.ImageField
-------------------------------+--------------------------
Reporter: jenyapri@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 1.6
Severity: Normal | Keywords: django-forms
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------
I have a problem with the forms.ImagaField. The problem is , that I want
to set initial value to this fieled dynamically , and then widget
ClearableFileInput will display the "Current link" and checkbox.I read
somewhere, that i have to pass "dictionary File" with attribute "url", and
then the widget will know to display it. But i don't know , how pass it
properly.
if attr.type == "Img":
self.fields [title] = forms.ImageField (required = bool
(required))
Where here, i have to assign an initial value.
Thank you.
--
Ticket URL: <https://code.djangoproject.com/ticket/21744>
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/061.0790d5bee4a8cc2ee0327bf2178329d5%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.