| Issue 63: | can we render forms like this? | |
| 2 people starred this issue and may be notified of changes. | Back to list |
I need indentication to that forms but "--" symbols are really ugly. So i wrote a script that builds html code with paddings. may be you can implement that style to your forms firefox.png is example screenshot category_options_for_select.html is generated html code bctfs.py (build category template for select) : builds <select> ... </select> form for selecting. bctfi.py is same with bctfs but, disables items that not selectible Note : my category model has : selectible = models.BooleanField(help_text="can user add an announce at that category?") Can you implement that code to django-mptt? i am using that html templates staticaly, may be you can make it as widget? thanks for your response
Sep 3, 2010
So basically this is a manage.py command that generates static templates fragments. This is fine if your tree is tiny and hardly ever changes, but when it does you have to go back and regenerate your template. wontfix. I will be investigating what improvements we can make to the fields in mptt/forms.py though.
Status:
WontFix
Sep 6, 2010
I think this is already possible right now. mptt.forms.TreeNodeChoiceField is a subclass of ModelChoiceField which prepends a freely definable string to the model self-description (__unicode__). |
749 bytes View Download