Skip to content

Commit

Permalink
changed import name and fixed typo in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mudiwa Matanda authored and Mudiwa Matanda committed Feb 8, 2024
1 parent ac509f9 commit 03ccfc9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
35 changes: 35 additions & 0 deletions home/templates/wagtail_content_import/picker_buttons_base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% if default_picker %}
<li class="actions import-container content-import">
<div class="dropdown dropup dropdown-button match-width">
<div class="content-import button button-longrunning dropdown-toggle">
<i class="icon icon-folder-open-inverse content-import docs-blue"></i>
Import web from doc
</div>
<div class="content-import dropdown-toggle icon icon-arrow-up"></div>
<ul>
<li>
<a href="#"
data-content-import-picker="{{ default_picker.name }}"
data-import-page-url="{% block default_import_page_url %}{% endblock %}"
{% block default_extra_attrs %}{% endblock %}
class="content-import button button-longrunning">
<i class="icon {{ default_picker.icon }} content-import docs-blue"></i>
Import from {{ default_picker.verbose_name }}
</a>
</li>
{% for picker in picker_options %}
<li>
<a href="#"
data-content-import-picker="{{ picker.name }}"
data-import-page-url="{% block import_page_url %}{% endblock %}"
{% block extra_attrs %}{% endblock %}
class="content-import button button-longrunning">
<i class="icon {{ picker.icon }} content-import docs-blue"></i>
Import from {{ picker.verbose_name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</li>
{% endif %}
4 changes: 2 additions & 2 deletions home/tests/test_content_import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ def test_ContentPageIndex_required_fields(self, csv_impexp: ImportExport) -> Non
content = csv_impexp.export_content()
src, dst = csv_impexp.csvs2dicts(csv_bytes, content)

# the importer adds extra fields, so we fikter for the ones we want
# the importer adds extra fields, so we filter for the ones we want
allowed_keys = ["message", "slug", "parent", "web_title", "locale"]
dst = [{k: v for k, v in item.items() if k in allowed_keys} for item in dst]
src = [{k: v for k, v in item.items() if k in allowed_keys} for item in src]
Expand All @@ -896,7 +896,7 @@ def test_ContentPage_required_fields(self, csv_impexp: ImportExport) -> None:
content = csv_impexp.export_content()
src, dst = csv_impexp.csvs2dicts(csv_bytes, content)

# the importer adds extra fields, so we fikter for the ones we want
# the importer adds extra fields, so we filter for the ones we want
allowed_keys = ["message", "slug", "parent", "web_title", "locale"]
dst = [{k: v for k, v in item.items() if k in allowed_keys} for item in dst]
src = [{k: v for k, v in item.items() if k in allowed_keys} for item in src]
Expand Down

0 comments on commit 03ccfc9

Please sign in to comment.