Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Available for django form ? #10

Closed
Bingo8 opened this issue Jul 11, 2018 · 2 comments
Closed

Available for django form ? #10

Bingo8 opened this issue Jul 11, 2018 · 2 comments

Comments

@Bingo8
Copy link

Bingo8 commented Jul 11, 2018

Hello, i am interested in this widget can be implied in the django form and presented in the template ?

@jerch
Copy link
Collaborator

jerch commented Jul 11, 2018

As long as the field is a django-treebeard or django-mptt based database field - yes. Simply use a modelform instance, add it to your template context and render the assets + the form itself.

Arbitrary tree forming data will not work out of the box. For this you gonna have to write your own formatter and change TreeSelectWidgetMixin.prepare_queryset in a way, that your custom data source is respected.

@jerch
Copy link
Collaborator

jerch commented Mar 9, 2019

Clsoing issue due to inactivity.

@jerch jerch closed this as completed Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants