django-treemenus
django-treemenus copied to clipboard
Select related extensions
Added possibility to select related extensions in models.MenuItem.children(). Requires new setting TREEMENUS_EXTENSION_RELATED_NAME set to the name of the relation.
This will reduce the number of SQL queries needed when using menu extensions.
Docs are updated accordingly.
That sounds good, although instead of catching an AttributeError it'd be nicer to test for the existence of that setting. Could you also add some tests, probably using assertNumQueries (https://docs.djangoproject.com/en/dev/topics/testing/#django.test.TestCase.assertNumQueries). Thanks!