Django admin add related object doesn't open popup window?

后端 未结 2 1460
暖寄归人
暖寄归人 2021-01-05 16:47

The django-admin app is supposed to open a popup window when I try to create a related object. For example, clicking the green plus button here:

Should brin

2条回答
  •  误落风尘
    2021-01-05 17:01

    This appears to be a reproducible error in 1.9.3. Testing it myself I setup a new project using the latest Django (1.9.3) and ran into the same error. Below is the fix. It seems to also work with 1.9.1 I will report to Django team now.

    +++ b/contrib/admin/templates/admin/related_widget_wrapper.html
    @@ -10,7 +10,7 @@
             
             {% endif %}
             {% if can_add_related %}
    -        
                 {% trans 'Add' %}
    

提交回复
热议问题