Appropriate way to handle deprecated `adminmedia` templatetag and {

后端 未结 2 1757
忘掉有多难
忘掉有多难 2021-02-04 00:07

From django 1.5 onwards, https://docs.djangoproject.com/en/1.5/releases/1.5/#miscellaneous

The template tags library adminmedia, which only contained the

2条回答
  •  醉梦人生
    2021-02-04 00:29

    I just copied what's in base.css:

    {% load admin_static %}
    

    and then

    
    

    (replace base.css with whatever you need, like login.css in your case)

    Make sure you have django.contrib.staticfiles in your INSTALLED_APPS.

    (I didn't need to configure STATIC_ROOT and run manage.py collectstatic as suggested previously by Anton)

提交回复
热议问题