On 5/31/08, Stuart Grimshaw <[EMAIL PROTECTED]> wrote:

> doh! yeah, Django.

do you really need to display it? with editable=false, the field will
not appear at all.

Or, you could show a disabled widget by enabling the "disabled" attribute:
forms.CharField(widget=forms.TextInput(attrs={'disabled':'true'}))

otherwise, i guess you can create a custom widget: "If the built-in
Field classes don't meet your needs, you can easily create custom
Field classes. To do this, just create a subclass of
django.newforms.Field. Its only requirements are that it implement a
clean() method and that its __init__() method accept the core
arguments mentioned above (required, label, initial, widget,
help_text)."

But I haven't played with django in a while so there might be other choices...

-- 
Giacomo Lacava

--~--~---------~--~----~------------~-------~--~----~
To post: [email protected]
To unsubscribe: [EMAIL PROTECTED]
Feeds available at http://groups.google.com/group/python-north-west/feeds
For more options: http://groups.google.com/group/python-north-west
-~----------~----~----~----~------~----~------~--~---

Reply via email to