google-code-export / django-mptt

Automatically exported from code.google.com/p/django-mptt
Other
0 stars 0 forks source link

can we render forms like this? #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by MiratCan...@gmail.com on 13 Sep 2009 at 12:34

Attachments:

GoogleCodeExporter commented 9 years ago
ops i forgot bctfi.py 

Original comment by MiratCan...@gmail.com on 13 Sep 2009 at 12:40

Attachments:

GoogleCodeExporter commented 9 years ago
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.

Original comment by craig.ds@gmail.com on 3 Sep 2010 at 11:18

GoogleCodeExporter commented 9 years ago
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__).

Original comment by matthias...@gmail.com on 6 Sep 2010 at 9:18