Created
September 11, 2012 18:45
-
-
Save mbrochh/3700774 to your computer and use it in GitHub Desktop.
Register admins of third party apps to admin site of django-ratelimit-backend
This file contains hidden or 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 import admin as django_admin | |
| from ratelimitbackend import admin | |
| django_admin.autodiscover() | |
| for admin_site in django_admin.site._registry.items(): | |
| if not admin_site[0] in admin.site._registry: | |
| admin.site.register(admin_site[0], admin_site[1].__class__) |
This file contains hidden or 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 myproject import admin as myproject_admin | |
| from ratelimitbackend import admin | |
| admin.autodiscover() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment