Created
November 18, 2016 19:31
-
-
Save hakjoon/b75a25fdd1f5ae0cb199280e8852e4d0 to your computer and use it in GitHub Desktop.
Update all content types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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