abidibo.net

Posted in "django-mptt"

Convert select multiple widget to checkboxes in django admin form

django django-admin django-mptt jquery

I think this should be a nice post talking about the substitution of the default multiple select widget used in django admin interface to deal with m2m fields, with a multiple checkbox widget.

Yes I know, you may solve it this way, but I don't like such solution very much, and I think it is just not perfect for some reasons:

  • At the time of this writing the add related functionality (+) seems to be broken, throws an error, at least for me
  • It just can't be used with the django-mptt application, which is awesome to deal with data which have a tree like structure

So to graphically explain what we want to do here, say we want this ...

read the full post


Using django-mptt TreeNodeChoiceField in a TabularInline admin form

django django-admin django-mptt

I use to use the django-mptt package to deal with tree like models. I also use to have my backoffice autogenerated by django admin.

Now one of the problems I've encountered was to add an inline form of a model which contains a "tree" field in a way the user can deal with a select input well formatted (showing parents and children in a clear way).

This task is easily reached in a normal form by defining the form ...

read the full post


  • 1

Your Smartwatch Loves Tasker!

Your Smartwatch Loves Tasker!

Now available for purchase!

Featured