Hii team,
I have customized Django admin where it's very simple to load a custom JS file for each of my ModelAdmins:
class MyModelAdmin(admin.ModelAdmin):
class Media:
js = ('js/admin/mymodel.js',)
But how to do this for the admin "homepage," where all my admin models are listed?
How do I include Django's jQuery in the JS file? If I wrap my code with:
(function ($) {
// my code here...
})(django.jQuery);
I get the following error:
ReferenceError: django is not defined.
Thanks.