[Django] #21744: Dinamic creation of forms.ImageField

2 views
Skip to first unread message

Django

unread,
Jan 8, 2014, 7:43:46 AM1/8/14
to django-...@googlegroups.com
#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.

Django

unread,
Jan 8, 2014, 8:02:18 AM1/8/14
to django-...@googlegroups.com
#21744: Dinamic creation of forms.ImageField
-------------------------------+--------------------------------------
Reporter: jenyapri@… | Owner: nobody
Type: Uncategorized | Status: closed
Component: Forms | Version: 1.6
Severity: Normal | Resolution: invalid

Keywords: django-forms | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timo):

* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0


Comment:

Please see
https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
-- thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/21744#comment:1>

Reply all
Reply to author
Forward
0 new messages