Skip to content

Instantly share code, notes, and snippets.

@benzkji
Last active March 4, 2022 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benzkji/118cf61c068f21101803b2f6a0726467 to your computer and use it in GitHub Desktop.
Save benzkji/118cf61c068f21101803b2f6a0726467 to your computer and use it in GitHub Desktop.
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