Well, as usual, I'm a doofus. I was inheriting from a widgets.Textarea and my render method above was missing the "value" field. Now some may ask, why exactly I was inheriting from the Textarea widget, and that would be an excellent question to which I have no good answer. Anyhow. Hopefully I'll get a chance to write this up in some coherent way tomorrow.
On Feb 16, 1:24 am, Zack <[EMAIL PROTECTED]> wrote: > That was an amazingly quick and helpful reply. Thanks Malcolm. I'd be > happy to write it up as soon as I have a solid idea of what's > happening. > > On Feb 16, 1:21 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > On Fri, 2008-02-15 at 22:13 -0800, Zack wrote: > > > So, > > > > I'd like to make a custom widget based on starbox (http:// > > >www.nickstakenburg.com/projects/starbox/). Basing this on the TinyMCE > > > example, but I am having some major difficulties rendering it. Namely > > > getting my TEMPLATE_STRING_IF_INVALID on the form when trying to > > > render it. > > > > 1) Is there a good way to debug this? > > > If you're seeing no output, it quite possibly means that there's been an > > exception raised somewhere. The normal thing would be to put debugging > > prints into a few of the methods of your widget class to see if/when > > particular lines are executed. It's quite possible, for example, that > > the JSON encoding might be failing, so putting prints before and after > > that line would help rule that out. > > > [...] > > > > 4) Is there any documentation on specifically for custom widgets, when > > > render gets called, etc? > > > Grep for "render" in forms.py to see where it's used. Basically, the > > only place is when a BoundField is rendered in the template. > > > There's no specific documentation on this. Perhaps you'd like to write > > up what you learn as a Wiki page to get the ball rolling? > > > Regards, > > Malcolm > > > -- > > Depression is merely anger without > > enthusiasm.http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

