Re: Advice on Subclassing a TextField

2009-08-30 Thread Mark (Nosrednakram)
I had at one time included the following and ended up putting it back so that syncdb would actually create the columns. Without it the table is created with the column being made. I am assuming this is correct but am not sure. def db_type(self): return TextField().db_type() Thanks

Re: Advice on Subclassing a TextField

2009-08-30 Thread Alex Robbins
Also, maybe you aren't submitting all the code, but you could do the same thing by just passing an attrs dictionary to the text area widget. http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs Not sure that this requires two more classes. Hope that helps, Alex

Re: Advice on Subclassing a TextField

2009-08-30 Thread Alex Gaynor
On Sun, Aug 30, 2009 at 1:53 AM, Mark Anderson wrote: > Hello, > > I wanted a field that would render in a rich text editor and store the data > in a TextField so I created a field type of HtmlField and custom HtmlWidge. > It works but I was wondering is anyone would be

Advice on Subclassing a TextField

2009-08-29 Thread Mark Anderson
Hello, I wanted a field that would render in a rich text editor and store the data in a TextField so I created a field type of HtmlField and custom HtmlWidge. It works but I was wondering is anyone would be willing to give me feedback on best practices etc, This is my first attempt at subclassing