Make the sidebar dynamic depending on the user's rights
This is done by doing the usual access checks that are also called
when the user actually visits the page.
from django.core.management.base import NoArgsCommand
class Command(NoArgsCommand):
help = "Validates all installed models."
requires_model_validation = False
def handle_noargs(self, **options):
self.validate(display_num_errors=True)