[Django]-Django – ModelAdmin media definition


Because I was not pointing to the good locations:

class ScribPartAdmin(admin.ModelAdmin):
  class Media:
    css = {
      'all': ('css/mymarkup.css',)
    js = ('javascript/mymarkup.js',)

admin.site.register(ScribPart, ScribPartAdmin)

is better.

Apparently Django includes medias that are not found by the collector into the change_list page but not into the change_form page. I don’t know why (or i’m missing something else)…

Leave a comment