Skip to content

Instantly share code, notes, and snippets.

@hakjoon
Created November 18, 2016 19:31
Show Gist options
  • Save hakjoon/b75a25fdd1f5ae0cb199280e8852e4d0 to your computer and use it in GitHub Desktop.
Save hakjoon/b75a25fdd1f5ae0cb199280e8852e4d0 to your computer and use it in GitHub Desktop.
Update all content types
from django.apps import apps
from django.contrib.contenttypes.management import update_contenttypes
def update_all_contenttypes(**kwargs):
for app_config in apps.get_app_configs():
update_contenttypes(app_config, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment