Management Commands

The following management commands are provided for administrative utilities:


When a language is unmaintained at the site, use this command to generate the URL redirects. The command outputs a script for the web server (currently only in Nginx format).


  • --from=language: the old language
  • --to=language: the new language
  • --format=nginx: the format
  • --site=id: the site for which redirects are created.


python make_language_redirects --from=it --to=en --format=nginx --site=1


In the unlikely event that the page tree is broken, this utility repairs the tree. This happened in earlier releases (before 1.0) when entire trees were moved in multi-lingual sites.

It regenerates the MPTT fields and URLs.


  • -p / --dry-run: tell what would happen, but don’t make any changes.
  • -m / --mptt-only: only regenerate the MPTT fields, not the URLs of the tree.


python rebuild_page_tree


This adds prefixes to the ContentType names in the database, to easily recognize the custom page types. This happens by default during migrations.

python prefix_pagetypes