But if you subclass the widget, then you'll need to override every
form's widget with
{
forms.DateField: MyDateWidget
}
so overriding and using your own MyDateField would be less verbose and
repetitive
On Sat, Aug 4, 2012 at 6:17 PM, Melvyn Sopacua <[email protected]> wrote:
> On 3-8-2012 18:23, Lee Hinde wrote:
>>
>> On Aug 3, 2012, at 9:01 AM, Melvyn Sopacua <[email protected]> wrote:
>>
>>> On 3-8-2012 17:37, Lee Hinde wrote:
>>>
>>>> self.fields['photo_response'].widget.attrs["class"] = 'date-field
>>>> input-small'
>>>> self.fields['photo_response'].widget.format = '%m-%d-%Y'
>
>> Thanks, that got me looking in the right place. I think I need to
>> sublcass the widget, since I'm concerned with the display of the data,
>> not how it's saved/stored?
>
> Yes, if the data doesn't need special handling you can stick to
> subclassing the widget.
>
> --
> Melvyn Sopacua
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde
|_|0|_|
|_|_|0|
|0|0|0|
(\__/)
(='.'=)This is Bunny. Copy and paste bunny
(")_(") to help him gain world domination.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.