Re: Dynamically modifying AdminOptions

2006-11-30 Thread noods
Oops, I made an error copying my code across. I forgot to call the parent class' contribute_to_class method: class RichTextField(models.TextField): "A rich text editor field which provides a WYSIWYG editor component." def contribute_to_class(self, cls, name): # Automatically add

Dynamically modifying AdminOptions

2006-11-30 Thread noods
Hi all, I'm trying to create a custom field which will automatically include some required JavaScript libraries in the admin interface, without having to modify contrib.admin. Currently I have a custom model field defined as follows: class RichTextField(models.TextField): "A rich text