Closed ddsnowboard closed 9 years ago
Wrote the docstring. Was long. Need to refactor to make less terrible.
In a more specific sense, what I'm going to do is either move the JavaScript into the templates folder or tell the template engine to look in the JavaScript folder, and then put all the variables that I'm setting in there instead of in the actual page. That way, I can just put the widget into the form and call it a day instead of all this craziness I've got now. It'll be good.
I think I can set the URL for the JSON string as an argument for the FormField in the form, so that's how I can decide which stocks are included in any specific Widget. I might also set it up so that the variables have names that depend on the name of the Widget that owns them so that I can have two on the same page and not get them confused.
Include some stuff about what it does exactly, how you should really use it (ie, with StockChoiceField), and what you need to include in your templates to make it work. That last one is important. That's why it's bold.