Created
September 12, 2011 10:11
-
-
Save miratcan/1210965 to your computer and use it in GitHub Desktop.
Overriding 3th party app (http://djangosnippets.org/snippets/1035/)
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 | |
from django.contrib.flatpages.models import FlatPage | |
# Override flatpage admin | |
class FlatPageAdmin(admin.ModelAdmin): | |
class Media: | |
js = ('/media/j/jquery.js', | |
'/media/j/admin_enhancements.js') | |
css = {'screen': ('/media/c/admin.css',)} | |
admin.site.unregister(FlatPage) | |
admin.site.register(FlatPage, FlatPageAdmin) |
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 | |
admin.autodiscover() | |
# import has to come after autodiscover, because we can't | |
# unregister FlatPage until it's already been registered. | |
import generic.admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment