Commits

George Notaras committed b47e2c1

Added button in the Domain changelist view to add zone from zone file.

Comments (0)

Files changed (2)

src/powerdns_manager/admin.py

     verbose_name_plural = 'zones'
     save_on_top = True
     actions = [set_domain_type_bulk, set_ttl_bulk]
+    change_list_template = 'powerdns_manager/domain_changelist.html'
     
     #
     # Build the ``inlines`` list. Only inlines for enabled RR types are included.

src/powerdns_manager/templates/powerdns_manager/domain_changelist.html

+{% extends "admin/change_list.html" %}
+{% load i18n %}
+{% load url from future %}
+
+{% block object-tools-items %}
+    {% if not is_popup %}
+        <li><a href="{% url 'import_zone' %}">{% trans 'Import from zone file' %}</a></li>
+    {% endif %}
+    {{block.super}}
+{% endblock %}