Created
December 4, 2014 23:13
-
-
Save ar45/e6bdfeef789c4caccb0b to your computer and use it in GitHub Desktop.
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.contrib.admin.sites import AlreadyRegistered | |
from django.db.models.loading import get_models | |
for model in get_models(): | |
try: | |
admin.site.register(model) | |
except AlreadyRegistered: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment