开发者

Django correct method to insert external css framework like Blueprint css into view

开发者 https://www.devze.com 2023-03-04 12:22 出处:网络
What is the best method to insert external css into view? Should I do this : class Media: 开发者_JAVA技巧css = (settings.ADMIN_MEDIA_PREFIX + \'button.css\',)

What is the best method to insert external css into view?

Should I do this :

   class Media:
   开发者_JAVA技巧    css = (settings.ADMIN_MEDIA_PREFIX + 'button.css',)

Or I directly insert them into html template.


From the context it seems that you're trying to insert CSS into a ModelAdmin, in which case your method is definitely correct and is the recommended one.

I would only touch the admin templates if you actually need to override part of them with new markup.

0

精彩评论

暂无评论...
验证码 换一张
取 消