March 2020
Intermediate to advanced
608 pages
17h 17m
English
We will enhance the Category model using the Materialized Path algorithm, as follows:
# myproject/apps/categories/models.pyfrom django.db import modelsfrom django.utils.translation import ugettext_lazy as _from treebeard.mp_tree import MP_Nodefrom myproject.apps.core.models import CreationModificationDateBaseclass Category(MP_Node, CreationModificationDateBase): title = models.CharField(_( ...