Skip to content

Instantly share code, notes, and snippets.

@benzkji
Last active March 4, 2022 13:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
from django.core.management.base import BaseCommand
from filer.models import Folder
class Command(BaseCommand):
def handle(self, *args, **options):
Folder._tree_manager.rebuild()
@benzkji
Copy link
Author

benzkji commented Mar 4, 2022

django management command that rebuilds django-filer's mptt tree for the Folder object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment