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 django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---