Django admin add related object doesn't open popup?

The django-admin application should open a popup when I try to create a related object. For example, by pressing the green plus button:

enter image description here

A new popup should appear, where I can create a new related (in this case, session) object. However, when I click the green plus button, the object is created in the same window, and not in the pop-up window. This is a problem, because if the user begins to create the primary object, then halfway, the green plus clicks, he will lose all progress on the main object. This means that green plus is not available.

, . , , . . , ? ?

, .

: Django admin . , . django .

Django 1.8.4.

: manage.py runserver. apache. , .

google: https://groups.google.com/forum/#!topic/django-users/awYelJjFjHk.

+4
2

, , . , :

, , , . , - .

- , , , accepter.

+2

, -, ​​1.9.3. , Django (1.9.3) . . 1.9.1. Django.

+++ b/contrib/admin/templates/admin/related_widget_wrapper.html
@@ -10,7 +10,7 @@
         </a>
         {% endif %}
         {% if can_add_related %}
-        <a class="related-widget-wrapper-link add-related" id="add_id_{{ name }}"
+        <a class="related-widget-wrapper-link add-another" id="add_id_{{ name }}"
             href="{{ add_related_url }}?{{ url_params }}"
             title="{% blocktrans %}Add another {{ model }}{% endblocktrans %}">
             <img src="{% static 'admin/img/icon-addlink.svg' %}" alt="{% trans 'Add' %}"/>
+1

Source: https://habr.com/ru/post/1612072/


All Articles