Skip to Content
Django 3 Web Development Cookbook - Fourth Edition
book

Django 3 Web Development Cookbook - Fourth Edition

by Aidas Bendoraitis, Jake Kronika
March 2020
Intermediate to advanced
608 pages
17h 17m
English
Packt Publishing
Content preview from Django 3 Web Development Cookbook - Fourth Edition

Using a checkbox list to choose multiple categories in forms with django-mptt

When one or more categories need to be selected at once in a form, you can use the TreeNodeMultipleChoiceField multiple selection field that is provided by django-mptt. However, multiple selection fields (for example, <select multiple>) are not very user-friendly from an interface point of view, as the user needs to scroll and hold control or command keys while clicking to make multiple choices. Especially when there is a fairly large number of items to choose from, and the user wants to select several at once, or the user has accessibility handicaps, such as poor motor control, this can lead to a really awful user experience. A much better approach is to provide ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Django 2 Web Development Cookbook - Third Edition

Django 2 Web Development Cookbook - Third Edition

Jake Kronika, Aidas Bendoraitis

Publisher Resources

ISBN: 9781838987428Supplemental Content