I have created my tree structure, now I am trying to create a form that 
selects a node which I will use to do some operations.

When I render the form 

class SelectNodeForm(MoveNodeForm):

    class Meta:

        model = Category


with {{form.as_p}}


I get the fields


Path

Depth

Numchild

Value

Position

Relative to


I would like the form to just contain relative to (but allow multiple 
selection)


Looking at the code here it looks like that field is called 

https://github.com/tabo/django-treebeard/blob/master/treebeard/forms.py


_ref_node_id = forms.TypedChoiceField(required=False,
                                          coerce=int,
                                          label=_("Relative to"))

But I cannot render a field that starts with an underscore. "Variables and 
attributes may not begin with underscores: "

So how can I select a django-treebeard node in a form?



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to