google-code-export / django-mptt

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

Cannot use empty space as level indicator in TreeNodeChoiceField #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

    parent = TreeNodeChoiceField(queryset=TrackingObject.objects.all(),
            level_indicator='  ')

The ampersands will be escaped, and the html will look like this:

    <option>&amp;nbsp;&amp;nbsp; item name</option>

Original issue reported on code.google.com by bendavi...@gmail.com on 11 Sep 2009 at 10:13

GoogleCodeExporter commented 9 years ago
You can use the Unicode Non-breaking space
(http://en.wikipedia.org/wiki/Non-breaking_space)

    level_indicator = unichr(0x00A0) * 4;

Original comment by samuel.l...@gmail.com on 20 Jan 2010 at 6:22

GoogleCodeExporter commented 9 years ago
Migrated to https://github.com/django-mptt/django-mptt/issues/#issue/83

Original comment by craig.ds@gmail.com on 19 Dec 2010 at 1:08